aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2015-01-29 19:09:39 +0100
committerGunnar Sletta <gunnar@sletta.org>2015-02-03 13:58:03 +0000
commitfa78127622424fba161f5f42e9e76c72e653828a (patch)
treef9f1889a85a00dea67b0b54b80606ffc949822a7 /src/quick/scenegraph/qsgcontext.cpp
parenta49b0ad7866046c28fb38f0f70ddf626e12c3099 (diff)
Introduce QSG_TRANSIENT_IMAGES.
This feature enables the same feature that we already have in the 'nonpreservedtexture' in the scene graph playground. This change also cleans up some leftover logic from the early Qt 5.2 days when we had to manually extract the image from the default texture factory rather than going through QQuickWindow::createTexture(). This cleanup is required for the logic to work. Change-Id: I7cdf15d981ba8af94f8d51781fc01e2b834b77c6 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 95388d82e0..096f53b94c 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -806,10 +806,7 @@ QSGTexture *QSGRenderContext::textureForFactory(QQuickTextureFactory *factory, Q
m_mutex.unlock();
if (!texture) {
- if (QQuickDefaultTextureFactory *dtf = qobject_cast<QQuickDefaultTextureFactory *>(factory))
- texture = createTexture(dtf->image());
- else
- texture = factory->createTexture(window);
+ texture = factory->createTexture(window);
m_mutex.lock();
m_textures.insert(factory, texture);