From 0a1e84d3a7c1da0a25414da579bba5154f190e79 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 22 Jun 2011 11:20:43 +1000 Subject: [PATCH] Make QSGCanvas::grabFrameBuffer() more reliable --- src/declarative/items/qsgcanvas.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index a27b14b..0500b75 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -2096,7 +2096,7 @@ void QSGCanvasRenderThread::run() // but we don't want to lock an extra time. wake(); - if (!d->animationRunning && !isExternalUpdatePending && !shouldExit) { + if (!d->animationRunning && !isExternalUpdatePending && !shouldExit && !doGrab) { #ifdef THREAD_DEBUG printf(" RenderThread: nothing to do, going to sleep...\n"); #endif @@ -2335,7 +2335,7 @@ QImage QSGCanvasRenderThread::grab() doGrab = true; isPaintCompleted = false; while (isRunning() && !isPaintCompleted) { - if (!isRenderBlocked) + if (isRenderBlocked) wake(); wait(); } -- 1.7.2.5