summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2016-06-03 13:58:40 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-06-10 14:42:57 +0100
commit702b58945b51e738cdcc3d383ca38881f9f1338d (patch)
tree9c1958b8c44ee5bbc7803765e498d2208b906556 /include
parentb523e20a8fb8c9c26e7ffdc1b3f5fd06c440985c (diff)
tdf#99519 Added more intelligent handling of animated GIFs
Isolated to a single Primitive2D class based on the AnimatedSwitch- Primitive2D which does the specializing in one place. Buffers small GIFs completely, handles 1st frame always buffered, huge GIFs get animated by just playing he next frame. To reach more with the current approach we would have to re-implement AnimatedGIF import, replay it internally on a sys-specific Surface and blit the current content (with alpha) to our display Reviewed-on: https://gerrit.libreoffice.org/26103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 285744fef87f4ca0278834b97d7f618bdba5f4c0) Change-Id: I46c3325fa7936df73bea9a9284a0421f1475a34b
Diffstat (limited to 'include')
-rw-r--r--include/drawinglayer/primitive2d/animatedprimitive2d.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx
index 7050cbbd33e7..f0cd6e89dcad 100644
--- a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx
@@ -66,6 +66,15 @@ namespace drawinglayer
*/
bool mbIsTextAnimation : 1;
+ protected:
+ /** write access right for classes deriving from this who want to do special
+ things (e.g. optimization, buffering).
+ Caution: This is an exception from the read-only, non-modifyable paradigm
+ for primitives, so special preparations may be needed. Usually should
+ only be used for initialization (e.g. in a derived constructor)
+ */
+ void setAnimationEntry(const animation::AnimationEntry& rNew);
+
public:
/// constructor
AnimatedSwitchPrimitive2D(