From: Aaron Kennedy Date: Wed, 22 Jun 2011 01:20:43 +0000 (+1000) Subject: Make QSGCanvas::grabFrameBuffer() more reliable X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=0a1e84d3a7c1da0a25414da579bba5154f190e79;p=konrad%2Fqtdeclarative.git Make QSGCanvas::grabFrameBuffer() more reliable --- 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(); }