diff options
author | Louis du Verdier <louis.du.verdier@free.fr> | 2014-06-05 08:44:16 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-05 14:09:31 +0200 |
commit | 468a65c89eebeeb8c02cb83fe8ffd37c3e8937d2 (patch) | |
tree | 5fb2ece74d4323b17a6500b74fe8573980f69b7e /src/quick/util/qquickpixmapcache_p.h | |
parent | 8a71e2bd031230777dcfbb482af40a03b8d91507 (diff) |
Optimize the way AnimatedImage display its content
Since QtQuick2, the AnimatedImage component is less efficient than it
was with QtQuick1, using more CPU and RAM.
This commit makes it upload when required each animation frame as a
cached texture (using QQuickPixmapCache) to speed up the component.
Task-number: QTBUG-38921
Change-Id: I7ab0b5f47ecec6cb3cdded0dd219d6acc1bc4148
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/quick/util/qquickpixmapcache_p.h')
-rw-r--r-- | src/quick/util/qquickpixmapcache_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/util/qquickpixmapcache_p.h b/src/quick/util/qquickpixmapcache_p.h index 6ab1ff6482..76bbf6d341 100644 --- a/src/quick/util/qquickpixmapcache_p.h +++ b/src/quick/util/qquickpixmapcache_p.h @@ -101,6 +101,7 @@ public: const QSize &requestSize() const; QImage image() const; void setImage(const QImage &); + void setPixmap(const QQuickPixmap &other); QQuickTextureFactory *textureFactory() const; @@ -122,6 +123,7 @@ public: bool connectDownloadProgress(QObject *, int); static void purgeCache(); + static bool isCached(const QUrl &url, const QSize &requestSize); private: Q_DISABLE_COPY(QQuickPixmap) |