summaryrefslogtreecommitdiff
path: root/include/drawinglayer
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 13:39:10 +0000
commit285744fef87f4ca0278834b97d7f618bdba5f4c0 (patch)
tree3192a9683c8f5715b70087b116b8b916dfcf6563 /include/drawinglayer
parentb0b29c244c4fdf4348c145b9a343940cff6519f1 (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 Change-Id: I46c3325fa7936df73bea9a9284a0421f1475a34b 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>
Diffstat (limited to 'include/drawinglayer')
-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 381cfd9d583c..d9f21164d866 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(