From 2a28bebdc8548c1171a3f255651edafe685da003 Mon Sep 17 00:00:00 2001 From: Daiwei Li Date: Fri, 27 Feb 2015 23:56:12 -0800 Subject: Implement cache property for QQuickAnimatedImage Some longer and larger .gifs can consume a lot of memory if every decoded frame is cached. Just as the backing QMovie provides the ability to not cache frame, so should AnimatedImage. This also allows a workaround for some animated image types that can contain loops that aren't handled correctly (QTBUG-24869) to not leak memory. Change-Id: I0639461d75bb2c758917893e7a6ae5c215fffa9d Task-number: QTBUG-44447 Task-number: QTBUG-24869 Task-number: QTBUG-28844 Reviewed-by: Alan Alpert --- tests/auto/quick/qquickanimatedimage/data/colors_nocache.qml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/auto/quick/qquickanimatedimage/data/colors_nocache.qml (limited to 'tests/auto/quick/qquickanimatedimage/data/colors_nocache.qml') diff --git a/tests/auto/quick/qquickanimatedimage/data/colors_nocache.qml b/tests/auto/quick/qquickanimatedimage/data/colors_nocache.qml new file mode 100644 index 0000000000..24adca68ec --- /dev/null +++ b/tests/auto/quick/qquickanimatedimage/data/colors_nocache.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +AnimatedImage { + source: "colors.gif" + cache: false +} -- cgit v1.2.3