aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2011-09-09 15:03:01 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-09-09 15:56:44 +0200
commit29cdbc18fe0bed887c1c0192bd539802b39cf01b (patch)
tree1da2a0f747cb8b9b362862d0f141494c8ed5f65c /src
parenta2e68623019cbbeca3c98ce7a6109b7f301ebddf (diff)
Make QSGItem::update() work when called from inside QSGCanvasPlainRenderLoop::paint()
If update was called in a function triggered by rendering, it would set the dirty flag without posting an update event. Subsequent render calls would just return without doing anything because the dirty flag was set. This could cause the applications UI to freeze up. Change-Id: Ib50403c1d9e22cc4680379f0c90fb2fcaa29c1d6 Reviewed-on: http://codereview.qt-project.org/4550 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qsgcanvas.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp
index b89a642e58..2f663681ae 100644
--- a/src/declarative/items/qsgcanvas.cpp
+++ b/src/declarative/items/qsgcanvas.cpp
@@ -91,6 +91,7 @@ public:
}
virtual void paint() {
+ updatePending = false;
if (animationRunning && animationDriver())
animationDriver()->advance();
polishItems();
@@ -99,7 +100,6 @@ public:
glViewport(0, 0, size.width(), size.height());
renderSceneGraph(size);
swapBuffers();
- updatePending = false;
if (animationRunning)
maybeUpdate();