aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2012-02-08 08:09:11 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-09 10:57:21 +0100
commit6c041f2122920307a2506067fdf64f65c614fbf7 (patch)
tree5e257977d83850c622598faeca203960a5c01b4d /src/quick/scenegraph/qsgcontext.cpp
parent8550ed69156f0472450fd11aabcaa5d4dcc676db (diff)
Pass the QQuickCanvas to texture factories.
This makes it a lot more convenient as we then have direct access to the GL context, createTexture(), invalidation signal and more. Change-Id: I114514d1379c4d0efcc35c512fa2b485da3438b0 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 1f26e57fa5..6817ad8862 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -159,7 +159,7 @@ void QSGContext::invalidate()
}
-QSGTexture *QSGContext::textureForFactory(QDeclarativeTextureFactory *factory)
+QSGTexture *QSGContext::textureForFactory(QDeclarativeTextureFactory *factory, QQuickCanvas *canvas)
{
Q_D(QSGContext);
if (!factory)
@@ -170,7 +170,7 @@ QSGTexture *QSGContext::textureForFactory(QDeclarativeTextureFactory *factory)
if (QDeclarativeDefaultTextureFactory *dtf = qobject_cast<QDeclarativeDefaultTextureFactory *>(factory))
texture = createTexture(dtf->image());
else
- texture = factory->createTexture();
+ texture = factory->createTexture(canvas);
d->textures.insert(factory, texture);
connect(factory, SIGNAL(destroyed(QObject *)), this, SLOT(textureFactoryDestroyed(QObject *)));
}