From 2b369c85062936519ac7d1eb286342ce322c340b Mon Sep 17 00:00:00 2001 From: Morten Johan Sorvig Date: Fri, 1 Jun 2012 11:24:04 +0200 Subject: [PATCH] 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 --- src/quick/items/qquickwindowmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.7.4