skia2/modules/skresources
Florin Malita ef666fa83d [skottie] Avoid image data duplication when pre-decoding
The MultiFrameImageAsset helper can be flagged to decode lazy images
upfront (to avoid run-time decoding and resource cache interactions).

But when pre-decoding is enabled, MultiFrameImageAsset yields a
different SkImage for every request - *even for static images*.

This means that e.g. each image layer precomp instance gets its own
copy of the data.  Bad bad bad.

Update MultiFrameImageAsset to cache the last frame, and reuse when
backed by a static image.

Change-Id: I65431e7ccf4a64f0055f935f9823c33402d1bb2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306938
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-07-30 22:09:41 +00:00
..
include [skottie] Avoid image data duplication when pre-decoding 2020-07-30 22:09:41 +00:00
src [skottie] Avoid image data duplication when pre-decoding 2020-07-30 22:09:41 +00:00
BUILD.gn [skottie/tools] Video playback support 2020-04-24 15:56:50 +00:00
skresources.gni Extracted Skottie's resource provider to a separate module 2019-11-25 18:58:26 +00:00