aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgcanvas.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-22 09:25:51 +0200
committerKim M. Kalland <kim.kalland@nokia.com>2011-08-22 12:16:26 +0200
commitf1a9c5e4f4031921f8ae3ec32512bfc9971a97da (patch)
tree720b5f145854a8fa15f6b9693b119403f828c228 /src/declarative/items/qsgcanvas.cpp
parent8be12e2ac7937ad21ec30cb335d5733735887117 (diff)
Reintroduce the QSGTextureProvider as a separate object
The texture provider needs to live completely in the rendering thread and needs to be selfcontained during rendering. During the items updatePaintNode() all needed state is copied into the texture provider. Texture providers have thread affinity in the rendering thread and are deleted there using deleteLater() and the added processEvents() in the rendering loop. This fixes the bug where a QSGItem is deleted as a result from an animation while the same item is being used as a texture provider in the rendering thread. There is also a small optimzation to QSGShaderEffectSource in that we don't create a paint node when the shader source is not going to be shown. Change-Id: I6b9bc1da2a0f55d3d5356d4091fd6af6a7ea6f01 Reviewed-on: http://codereview.qt.nokia.com/3293 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/declarative/items/qsgcanvas.cpp')
-rw-r--r--src/declarative/items/qsgcanvas.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp
index 48ed443902..1caee4fd72 100644
--- a/src/declarative/items/qsgcanvas.cpp
+++ b/src/declarative/items/qsgcanvas.cpp
@@ -1963,6 +1963,9 @@ void QSGCanvasRenderThread::run()
}
unlock();
+
+ // Process any "deleteLater" objects...
+ QCoreApplication::processEvents();
}
#ifdef THREAD_DEBUG