diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2012-02-08 08:09:11 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-09 10:57:21 +0100 |
commit | 6c041f2122920307a2506067fdf64f65c614fbf7 (patch) | |
tree | 5e257977d83850c622598faeca203960a5c01b4d /src/quick/util | |
parent | 8550ed69156f0472450fd11aabcaa5d4dcc676db (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/util')
-rw-r--r-- | src/quick/util/qdeclarativepixmapcache.cpp | 2 | ||||
-rw-r--r-- | src/quick/util/qdeclarativepixmapcache_p.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/util/qdeclarativepixmapcache.cpp b/src/quick/util/qdeclarativepixmapcache.cpp index 80359231d3..3670c58662 100644 --- a/src/quick/util/qdeclarativepixmapcache.cpp +++ b/src/quick/util/qdeclarativepixmapcache.cpp @@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE // The cache limit describes the maximum "junk" in the cache. static int cache_limit = 2048 * 1024; // 2048 KB cache limit for embedded in qpixmapcache.cpp -QSGTexture *QDeclarativeDefaultTextureFactory::createTexture() const +QSGTexture *QDeclarativeDefaultTextureFactory::createTexture(QQuickCanvas *) const { QSGPlainTexture *t = new QSGPlainTexture(); t->setImage(im); diff --git a/src/quick/util/qdeclarativepixmapcache_p.h b/src/quick/util/qdeclarativepixmapcache_p.h index 7b3df977e5..19c3a5264f 100644 --- a/src/quick/util/qdeclarativepixmapcache_p.h +++ b/src/quick/util/qdeclarativepixmapcache_p.h @@ -68,7 +68,7 @@ public: { } - QSGTexture *createTexture() const; + QSGTexture *createTexture(QQuickCanvas *canvas) const; QSize textureSize() const { return im.size(); } int textureByteCount() const { return im.byteCount(); } QImage image() const { return im; } |