skia2/modules/skottie
Florin Malita ab706d85e0 [skottie] SkTArray begone
SkTArray is not a good choice for tigh allocations:

  - its minimum allocation count is 8
  - reserve(sz) doesn't adjust capacity to the exact value, but padds
    the same way as normal growth (max(sz, 8, 50%))
  - no shrink_to_fit() function to trim unneeded capacity

Since keyframed properties with a small number of frames are quite
common in Lottie, this adds significant heap overhead.

Switch to std::vector(), reserve() to the estimated frame count and
shrink_to_fit() when done parsing.

Bug: skia:8340

Change-Id: Id575e2da2fd17537948c2b38485a8accdb9f7a8b
Reviewed-on: https://skia-review.googlesource.com/150905
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-08-31 15:14:27 +00:00
..
fuzz [skottie] Make the resource provider factory argument optional 2018-05-31 16:39:13 +00:00
include [skottie] Ref-counted ResourceProvider 2018-08-23 20:04:46 +00:00
src [skottie] SkTArray begone 2018-08-31 15:14:27 +00:00
BUILD.gn [skottie/sksg] Move source files list to .gni 2018-08-02 16:29:13 +00:00
skottie.gni [skottie] Make AnimationBuilder available for value parsing 2018-08-26 00:39:48 +00:00