Clear the pendingUpdate flag every frame.
authorGunnar Sletta <gunnar.sletta@digia.com>
Mon, 22 Apr 2013 11:41:53 +0000 (13:41 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 23 Apr 2013 10:53:48 +0000 (12:53 +0200)
Change-Id: Icd9bf8ec63e46341f5a43dbb85fe6a3a885f6afb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
src/quick/scenegraph/qsgthreadedrenderloop.cpp

index 4cca87e..de1e251 100644 (file)
@@ -515,7 +515,6 @@ void QSGRenderThread::sync()
     mutex.lock();
 
     Q_ASSERT_X(guiIsLocked, "QSGRenderThread::sync()", "sync triggered on bad terms as gui is not already locked...");
-    pendingUpdate = 0;
 
     for (int i=0; i<m_windows.size(); ++i) {
         Window &w = const_cast<Window &>(m_windows.at(i));
@@ -557,8 +556,10 @@ void QSGRenderThread::syncAndRender()
     syncResultedInChanges = false;
 
     bool repaintRequested = pendingUpdate & RepaintRequest;
+    bool syncRequested = pendingUpdate & SyncRequest;
+    pendingUpdate = 0;
 
-    if (pendingUpdate & SyncRequest) {
+    if (syncRequested) {
         RLDEBUG("    Render:  - update pending, doing sync");
         sync();
     }