skia2/modules/skottie
Mike Klein f51e1fd37d raster 8888 pow2 samples hack
The gist here is to use saveLayer() to create a buffer to draw each
subframe into, but not actually use it to draw anything at restore()
time, hence, canvas->clear(0).  (SkCanvas sniffs out cleverer approaches
like 0 alpha or SkBlendMode::kDst.)

Instead, we accessTopLayerPixels() and slurp the subframe out into a
16-bit accumulator, then when all subframes have drawn and accumulated
there, one more saveLayer() and accessTopLayerPixels() lets us put them
back, shifting back down to 8-bit.

The hot parts of the profile are drawing the frames themselves, then the
accumulate / repack code in renderToRaster8888Pow2Samples().

  $ time out/skottie_tool -i ~/Downloads/mb/data.json -w bar
  Before: 28.39user 1.14system 0:29.54elapsed
  After:  22.08user 1.12system 0:23.21elapsed

    I'm not proud of it.
    ...
    ...
    ...
    I am a bit!

Now using one layer.

Change-Id: I241529fad4c5b55c6abc55793f2d9c9693a03c18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242853
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-09-20 03:53:08 +00:00
..
fuzz rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
gm [skottie] Pass asset IDs to ResourceProvider::loadImageAsset 2019-07-17 01:08:05 +00:00
include [skottie] Clean up TextAdapter 2019-09-03 15:29:36 +00:00
src raster 8888 pow2 samples hack 2019-09-20 03:53:08 +00:00
utils [skottie] Pass asset IDs to ResourceProvider::loadImageAsset 2019-07-17 01:08:05 +00:00
BUILD.gn [skottie,skshaper] Plumb an optional SkFontMgr in SkShaper/SkottieShaper 2019-07-26 19:34:48 +00:00
skottie.gni [skottie] Initial Hue/Saturate effect support 2019-08-02 18:04:14 +00:00