diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-12-02 07:59:44 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-02 09:05:05 +0100 |
commit | e32eb8ee5d413ab6a908c2e3274645a489cb9df2 (patch) | |
tree | a6e0491905ad6af212f40e41ee2e2ed5bb0b90ef /src/declarative/scenegraph/qsgcontext_p.h | |
parent | 310618d504aed92ac532c69471ef196829b3f07c (diff) |
Remove QSGContext and QSGTexture from QDeclarativePixmapData
In order to cleanly support multiple windows we need to not
have the QSGContext reference in QDeclarativeEngine and we
need to be able to have one copy of the texture for each
QSGContext that is not sharing when we have multiple windows.
This also makes it easier to the release graphical resources from
a running application, which is another feature that we want
to eventually implement.
This patch does remove an adaptation feature which is the
decodeToTexture, which seemed like a good idea at the time
but in hindsight has not been used for anything.
Edit: resolved conflict in qquickimage.cpp
Edit: updated QDeclarativePixmap testcase
Edit: updated QQuickImage testcase
Edit: Rebased on top of QDeclarativePixmapCacheChanges
Change-Id: Ifc61dd8158d3f841437d029b6031a91196145517
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/declarative/scenegraph/qsgcontext_p.h')
-rw-r--r-- | src/declarative/scenegraph/qsgcontext_p.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/declarative/scenegraph/qsgcontext_p.h b/src/declarative/scenegraph/qsgcontext_p.h index 41a9a4a89b..ed1654b8fc 100644 --- a/src/declarative/scenegraph/qsgcontext_p.h +++ b/src/declarative/scenegraph/qsgcontext_p.h @@ -73,6 +73,8 @@ class QSGEngine; class QOpenGLContext; class QOpenGLFramebufferObject; +class QDeclarativeTextureFactory; + class Q_DECLARATIVE_EXPORT QSGContext : public QObject { Q_OBJECT @@ -113,10 +115,9 @@ public: virtual QSurfaceFormat defaultSurfaceFormat() const; - static QSGContext *createDefaultContext(); + QSGTexture *textureForFactory(QDeclarativeTextureFactory *factory); - void scheduleTextureForCleanup(QSGTexture *texture); - void cleanupTextures(); + static QSGContext *createDefaultContext(); void setFlashModeEnabled(bool enabled); bool isFlashModeEnabled() const; @@ -131,6 +132,9 @@ public: signals: void ready(); + +public slots: + void textureFactoryDestroyed(QObject *o); }; QT_END_NAMESPACE |