From: Morten Johan Sorvig Date: Fri, 1 Jun 2012 09:24:04 +0000 (+0200) Subject: Don't swap buffers before the window is exposed. X-Git-Tag: 071012131707~228 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b369c85062936519ac7d1eb286342ce322c340b;p=profile%2Fivi%2Fqtdeclarative.git Don't swap buffers before the window is exposed. At app startup there is often a delay between setting a window visible and the window being exposed by the window manager. Add check to canvas->isExposed() before calling swapbuffers. Change-Id: I5e588ab334a72c4fe817da44eff4c3dc785d6b1f Reviewed-by: Robin Burchell Reviewed-by: Gunnar Sletta --- diff --git a/src/quick/items/qquickwindowmanager.cpp b/src/quick/items/qquickwindowmanager.cpp index 2022d24..3cfa871 100644 --- a/src/quick/items/qquickwindowmanager.cpp +++ b/src/quick/items/qquickwindowmanager.cpp @@ -706,7 +706,7 @@ void QQuickRenderThreadSingleContextWindowManager::run() printf(" RenderThread: --- wait for swap...\n"); #endif - if (canvasData->isVisible) + if (canvasData->isVisible && canvas->isExposed()) gl->swapBuffers(canvas); canvasPrivate->fireFrameSwapped();