aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Cattell <matthew.cattell@nokia.com>2011-08-18 15:19:22 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-08-18 15:29:22 +0200
commita8cd4aec45976062773ef88c0aa3c6fcee33a5b3 (patch)
treef83a6c94649bc312a79c49d15d862894bcd9fd5d
parentc1af214c80ccc3035e71febc389767092f3fb6bd (diff)
added frame swap notification to notify compositor that frame was swapped
Change-Id: I4ef2387f36c4eaad0b63786d9c35d05ed947c136 Reviewed-on: http://codereview.qt.nokia.com/3190 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
-rw-r--r--src/declarative/items/qsgcanvas.cpp2
-rw-r--r--src/declarative/items/qsgcanvas.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp
index ec3a2ca43f..48ed443902 100644
--- a/src/declarative/items/qsgcanvas.cpp
+++ b/src/declarative/items/qsgcanvas.cpp
@@ -1937,7 +1937,7 @@ void QSGCanvasRenderThread::run()
#endif
guiContext->swapBuffers(renderer);
-
+ emit renderer->frameSwapped();//notify compositor that frame has been swapped
#ifdef THREAD_DEBUG
printf(" RenderThread: swap complete...\n");
#endif
diff --git a/src/declarative/items/qsgcanvas.h b/src/declarative/items/qsgcanvas.h
index a7846d818a..86efdcbfdc 100644
--- a/src/declarative/items/qsgcanvas.h
+++ b/src/declarative/items/qsgcanvas.h
@@ -85,6 +85,9 @@ public:
void setRenderTarget(QGLFramebufferObject *fbo);
QGLFramebufferObject *renderTarget() const;
+signals:
+ void frameSwapped();
+
Q_SIGNALS:
void sceneGraphInitialized();
@@ -115,6 +118,7 @@ private Q_SLOTS:
private:
friend class QSGItem;
+ friend class QSGCanvasRenderThread;
Q_DISABLE_COPY(QSGCanvas)
};