diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-06-08 07:06:25 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-06-08 07:11:24 +0200 |
commit | 6d91133bae78ecb98cc701b5c31f7a570cf58a6e (patch) | |
tree | 3e489096c23c6397470e056ccc122f6d1e28d0ff | |
parent | 6b0af9fe9fd9114bd579510010c09519928f91ce (diff) |
Wake render thread when doing paint() and grab() as in resize()
-rw-r--r-- | src/declarative/items/qsgcanvas.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index 963c19f25d..240088cf23 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -2085,8 +2085,11 @@ void QSGCanvasRenderThread::paint() exhaustSyncEvent(); isPaintCompleted = false; - while (isRunning() && !isPaintCompleted) + while (isRunning() && !isPaintCompleted) { + if (isRenderBlocked) + wake(); wait(); + } unlockInGui(); // paint is only called for the inital show. After that we will do all @@ -2182,9 +2185,7 @@ QImage QSGCanvasRenderThread::grab() doGrab = true; isPaintCompleted = false; while (isRunning() && !isPaintCompleted) { - // If we're in an animation we don't need to wake as we know another frame - // will be pending anyway. - if (!d->animationRunning) + if (!isRenderBlocked) wake(); wait(); } |