Skip to content

Commit

Permalink
Emit the QQuickCanvas::frameSwapped signal again.
Browse files Browse the repository at this point in the history
This got lost in the window manager rewrite

Change-Id: Ibaed76814ae676ce4ce3f50def196b8d67fd3df0
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
  • Loading branch information
Gunnar Sletta authored and Qt by Nokia committed Dec 20, 2011
1 parent 97f6dbc commit 0eca9de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/quick/items/qquickcanvas_p.h
Expand Up @@ -165,6 +165,8 @@ class QQuickCanvasPrivate : public QWindowPrivate
void updateEffectiveOpacityRoot(QQuickItem *, qreal);
void updateDirtyNode(QQuickItem *);

void fireFrameSwapped() { emit q_func()->frameSwapped(); }

QSGEngine *engine;
QSGContext *context;
QSGRenderer *renderer;
Expand Down
5 changes: 4 additions & 1 deletion src/quick/items/qquickwindowmanager.cpp
Expand Up @@ -655,6 +655,7 @@ void QQuickRenderThreadSingleContextWindowManager::run()
#endif

gl->swapBuffers(canvas);
canvasPrivate->fireFrameSwapped();
#ifdef THREAD_DEBUG
printf(" RenderThread: --- swap complete...\n");
#endif
Expand Down Expand Up @@ -1159,8 +1160,10 @@ void QQuickTrivialWindowManager::renderCanvas(QQuickCanvas *canvas)
data.grabOnly = false;
}

if (alsoSwap)
if (alsoSwap) {
gl->swapBuffers(canvas);
cd->fireFrameSwapped();
}

// Might have been set during syncSceneGraph()
if (data.updatePending)
Expand Down

0 comments on commit 0eca9de

Please sign in to comment.