aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgtexture_p.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@live.com>2013-01-25 21:00:15 -0600
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-01 20:56:48 +0100
commit8b50a9f00f6f5b693d18c59ff15968e2b902ebf8 (patch)
tree9970a72f51fcbe264edd3ad5bfc5ab09f4eedfb1 /src/quick/scenegraph/util/qsgtexture_p.h
parentb7c3d7b4d50055d0f8534a9ca73df56c888d77a1 (diff)
Dereference the QImage once the corresponding texture is bound.
We do not require a reference here, as the texture is only bound once. It is the texture factory that is reused (when QQuickWIndow::setPersistentSceneGraph(false) is set and the window is hidden and then re-exposed). With this patch it becomes trivial to create a custom QSGContextPlugin with a texture factory that does not retain the QImage, freeing up memory. This is useful in the case of an embedded system with only a single window that is never hidden or re-exposed. Change-Id: I1cfa6efc3a2e9e641b456bf90c55d563061757b8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/quick/scenegraph/util/qsgtexture_p.h')
-rw-r--r--src/quick/scenegraph/util/qsgtexture_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/scenegraph/util/qsgtexture_p.h b/src/quick/scenegraph/util/qsgtexture_p.h
index ed1d782c35..6430a93ed8 100644
--- a/src/quick/scenegraph/util/qsgtexture_p.h
+++ b/src/quick/scenegraph/util/qsgtexture_p.h
@@ -112,6 +112,7 @@ protected:
uint m_dirty_bind_options : 1;
uint m_owns_texture : 1;
uint m_mipmaps_generated : 1;
+ uint m_retain_image: 1;
};
QT_END_NAMESPACE