diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-08-22 13:48:13 +0200 |
---|---|---|
committer | Kim M. Kalland <kim.kalland@nokia.com> | 2011-08-22 14:01:52 +0200 |
commit | 9d1c8f04e172ff8dda7d04916366a75cf916a280 (patch) | |
tree | 56a48438dec235cce47e7ccfde48f4a87761146a /src/declarative/items/qsgshadereffectsource.cpp | |
parent | 3cad04e17ca77c130839abccc98381a05c4ae07b (diff) |
Make textureProvider() a virtual accessor in QSGItem.
This gets us one step closer to a public QSGTextureProvider
API.
This patch also includes a fix to the material ownership in
QSGCustomParticle.
Change-Id: I620e3006816db0c37eedf3a20a0d4cbe7a783b82
Reviewed-on: http://codereview.qt.nokia.com/3317
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/qsgshadereffectsource.cpp')
-rw-r--r-- | src/declarative/items/qsgshadereffectsource.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/items/qsgshadereffectsource.cpp b/src/declarative/items/qsgshadereffectsource.cpp index 24580073b1..f9dbfe58ec 100644 --- a/src/declarative/items/qsgshadereffectsource.cpp +++ b/src/declarative/items/qsgshadereffectsource.cpp @@ -515,9 +515,10 @@ QSGShaderEffectSource::~QSGShaderEffectSource() QSGTextureProvider *QSGShaderEffectSource::textureProvider() const { if (!m_provider) { - Q_ASSERT(QSGItemPrivate::get(this)->sceneGraphContext()); // Make sure it gets thread affinity on the rendering thread so deletion works properly.. - Q_ASSERT_X(QThread::currentThread() == QSGItemPrivate::get(this)->sceneGraphContext()->thread(), + Q_ASSERT_X(QSGItemPrivate::get(this)->canvas + && QSGItemPrivate::get(this)->sceneGraphContext() + && QThread::currentThread() == QSGItemPrivate::get(this)->sceneGraphContext()->thread(), "QSGShaderEffectSource::textureProvider", "Cannot be used outside the GUI thread"); const_cast<QSGShaderEffectSource *>(this)->m_provider = new QSGShaderEffectSourceTextureProvider(); |