aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindowmanager.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-03-19 13:33:23 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-19 08:30:14 +0100
commit6500e8c572261770185b9dc0e3764758cf651e2d (patch)
tree21cce104884ced8b8619e42bc2372b44a999e6ba /src/quick/items/qquickwindowmanager.cpp
parent20ffaaf2977255147ad8a45762d5efb6b5635829 (diff)
Fix grabbing to wait until the image has actually been grabbed.
Change-Id: I3535c57b5d8dd99c8a6cf24ccb1b56af298fcfe6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquickwindowmanager.cpp')
-rw-r--r--src/quick/items/qquickwindowmanager.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/quick/items/qquickwindowmanager.cpp b/src/quick/items/qquickwindowmanager.cpp
index 12c5dbd932..64eb2bf53b 100644
--- a/src/quick/items/qquickwindowmanager.cpp
+++ b/src/quick/items/qquickwindowmanager.cpp
@@ -107,11 +107,6 @@ extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_
lock. This variable is an integer to allow for recursive calls to lockInGui()
without using a recursive mutex. See isPostingSyncEvent.
- RenderThread::isPaintComplete: This variable is cleared when rendering starts and
- set once rendering is complete. It is monitored in the paintEvent(),
- resizeEvent() and grab() functions to force them to wait for rendering to
- complete.
-
RenderThread::isPostingSyncEvent: This variable is set in the render thread just
before the sync event is sent to the GUI thread. It is used to avoid deadlocks
in the case where render thread waits while waiting for GUI to pick up the sync
@@ -160,7 +155,6 @@ public:
, allowMainThreadProcessingFlag(false)
, isGuiLocked(0)
, animationRunning(false)
- , isPaintCompleted(false)
, isPostingSyncEvent(false)
, isRenderBlocked(false)
, isExternalUpdatePending(false)
@@ -248,7 +242,6 @@ private:
int isGuiLocked;
uint animationRunning: 1;
- uint isPaintCompleted : 1;
uint isPostingSyncEvent : 1;
uint isRenderBlocked : 1;
uint isExternalUpdatePending : 1;
@@ -723,8 +716,6 @@ void QQuickRenderThreadSingleContextWindowManager::run()
handleRemovedWindows();
- isPaintCompleted = true;
-
// Update sizes...
for (QHash<QQuickCanvas *, CanvasData *>::const_iterator it = m_rendered_windows.constBegin();
it != m_rendered_windows.constEnd(); ++it) {
@@ -1077,8 +1068,7 @@ QImage QQuickRenderThreadSingleContextWindowManager::grab(QQuickCanvas *canvas)
exhaustSyncEvent();
canvasToGrab = canvas;
- isPaintCompleted = false;
- while (isRunning() && !isPaintCompleted) {
+ while (isRunning() && canvasToGrab) {
if (isRenderBlocked)
wake();
wait();