b24f3b150c
For each Lottie keyframe, we currently store interpolation *segments*: { t0, v0 t1, v1 cubic_mapper } This is quite redundant: - kf(n).t1 == kf(n+1).t0 for all keyframes - kf(n).v1 == kf(n+1).v0 for all non-constant keyframes Refactor to store single keyframe records: { t, v mapping } To identify constant keyframes, since we no longer store explicit hard stops, we now tag each record with a "mapping" selector: 0 -> constant keyframe 1 -> linear keyframe > 1 -> cubic keyframe (adjusted cubic mapper index) This reduces the storage size by 2/5, and yields overall cleaner logic (as we're no longer back-filling info as we parse). Also add a handful of unit tests to lock down limit semantics (keyframe segments are left-inclusive/right-exclusive). Change-Id: I3ab0e5568b83ab8536a7d326dbc07c4c455e978d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270450 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
dm | ||
docker | ||
docs/examples | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
specs | ||
src | ||
tests | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
go.mod | ||
go.sum | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
RELEASE_NOTES.txt | ||
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.