added frame swap notification to notify compositor that frame was swapped
authorMatthew Cattell <matthew.cattell@nokia.com>
Thu, 18 Aug 2011 13:19:22 +0000 (15:19 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Thu, 18 Aug 2011 13:29:22 +0000 (15:29 +0200)
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>

src/declarative/items/qsgcanvas.cpp
src/declarative/items/qsgcanvas.h

index ec3a2ca..48ed443 100644 (file)
@@ -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
index a7846d8..86efdcb 100644 (file)
@@ -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)
 };