skia2/modules
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
..
canvaskit New proposed syntax for SkColorTypes 2019-09-19 20:42:55 +00:00
particles Particles: Sub-effect spawning and some slight refactoring 2019-09-19 15:18:13 +00:00
pathkit Revert "add guard to switch to SkPathTypes" 2019-09-14 19:13:44 +00:00
skottie raster 8888 pow2 samples hack 2019-09-20 03:53:08 +00:00
skparagraph Fix for the build 2019-09-04 21:59:09 +00:00
skplaintexteditor tools/skui: put all enums in a common namespace 2019-08-29 15:39:32 +00:00
sksg Revert "add guard to switch to SkPathTypes" 2019-09-14 19:13:44 +00:00
skshaper Properly subset the run in ShapeThenWrap. 2019-09-17 19:24:07 +00:00