ab706d85e0
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> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
dm | ||
docker | ||
docs | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
src | ||
tests | ||
third_party | ||
tools | ||
.clang-format | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
Doxyfile | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
whitespace.txt |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.