aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgimage_p_p.h
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/qsgimage_p_p.h
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/qsgimage_p_p.h')
-rw-r--r--src/declarative/items/qsgimage_p_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/items/qsgimage_p_p.h b/src/declarative/items/qsgimage_p_p.h
index d0b109942a..9f8b9716c7 100644
--- a/src/declarative/items/qsgimage_p_p.h
+++ b/src/declarative/items/qsgimage_p_p.h
@@ -59,7 +59,7 @@
QT_BEGIN_NAMESPACE
-class QSGImagePrivate;
+class QSGImageTextureProvider;
class QSGImagePrivate : public QSGImageBasePrivate
{
@@ -76,6 +76,8 @@ public:
bool pixmapChanged : 1;
QSGImage::HAlignment hAlign;
QSGImage::VAlignment vAlign;
+
+ QSGImageTextureProvider *provider;
};
QT_END_NAMESPACE