skia2/modules
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
..
pathkit [PathKit] Remove experimental- from package names 2018-08-31 15:11:04 +00:00
skottie [skottie] SkTArray begone 2018-08-31 15:14:27 +00:00
sksg [skottie] Add support for keyframed text nodes 2018-08-27 14:37:47 +00:00
skshaper make some textblob builders private for now 2018-08-09 15:01:31 +00:00