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/items/qquickanimatedimage_p_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/items/qquickanimatedimage_p_p.h')
-rw-r--r-- | src/quick/items/qquickanimatedimage_p_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickanimatedimage_p_p.h b/src/quick/items/qquickanimatedimage_p_p.h index 21b891eadd..0be24dece5 100644 --- a/src/quick/items/qquickanimatedimage_p_p.h +++ b/src/quick/items/qquickanimatedimage_p_p.h @@ -72,6 +72,8 @@ public: { } + QQuickPixmap *infoForCurrentFrame(QQmlEngine *engine); + bool playing; bool paused; int preset_currentframe; @@ -79,6 +81,7 @@ public: QNetworkReply *reply; int redirectCount; bool oldPlaying; + QMap<int, QQuickPixmap *> frameMap; }; QT_END_NAMESPACE |