skia2/include/codec
Leon Scroggins III 7a10b332a3 Add an SkDrawable for animated images (e.g. GIF)
Bug: b/63909536

SkAnimatedImage is a simple drawable for animating a GIF. Thread-safety
is left up to the client. At most two bitmaps are stored in the
drawable; one for the current frame and one for a frame that may need to
be restored. The backup frame prevents some cases where we would
otherwise have to re-decode from the beginning of the image.

The API lets the client set the time value, and decodes to match that
time.

TODO:
- Callback for when the animation is complete
- Ability to use SkAndroidCodec
- Modify the loop count (or leave that up to client?)
- Better and/or client-specific caching

Other changes:
- Add a sample which animates a GIF
- Reenable SK_CODEC_PRINTF for debug builds and Android

Change-Id: I945ffbccdb6008f2a05ed4d9b2af869a261fb300
Reviewed-on: https://skia-review.googlesource.com/93420
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-12 19:36:11 +00:00
..
SkAndroidCodec.h Add SkAndroidCodec::MakeFromCodec 2018-01-04 21:36:04 +00:00
SkAnimatedImage.h Add an SkDrawable for animated images (e.g. GIF) 2018-01-12 19:36:11 +00:00
SkCodec.h Reland "Hide SkEncodedInfo" 2017-12-05 19:28:08 +00:00
SkCodecAnimation.h Make SkCodec more flexible about its required frame 2017-06-07 20:15:17 +00:00
SkEncodedOrigin.h Move SkCodec::Origin into its own file 2017-10-18 19:08:16 +00:00