Commit Graph

9 Commits

Author SHA1 Message Date
Florin Malita
cca86f386c [skottie] Hierarchical animators
Instead of a flat animator space, introduce animator groups.

This allows us to encapsulate layer animators and only dispatch ticks
when their owning layer is active.

TBR=

Change-Id: I1fc8a55abf68a712b71969bb1a11275dbe54c236
Reviewed-on: https://skia-review.googlesource.com/101201
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-29 16:16:21 +00:00
Florin Malita
fc807c885b [skottie] Refactor animators
Separate storage for values, cubic maps, repeated values deduplication.

TBR=

Change-Id: Ibfbcea91ef1d7b1da937b4af44079e7612d410cb
Reviewed-on: https://skia-review.googlesource.com/99981
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-26 13:13:24 +00:00
Florin Malita
cf8ed52895 [skottie] Parser cleanup
Consolidate parsing utils into their own CU.

TBR=

Change-Id: Idbf6db5220135ba91df6ebefce3a241c6ec4af15
Reviewed-on: https://skia-review.googlesource.com/99721
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-25 21:23:18 +00:00
Florin Malita
a55a591e5a [skottie] Cache the last keyframe
We can avoid searching on every tick.

TBR=

Change-Id: Ifc3ff40f1f5ec2bf865c09a8e784223aa8a96674
Reviewed-on: https://skia-review.googlesource.com/99580
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-25 00:37:11 +00:00
Florin Malita
2518a0a328 [skottie] Animator scrubbing
Use std::function and lambda closures to capture node type info.

Reduces the template degree.

TBR=

Change-Id: Id81ff3e2e1fca5c8acaaf2d0fc67e608d6f3d606
Reviewed-on: https://skia-review.googlesource.com/99261
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-24 23:53:51 +00:00
Florin Malita
2d5fb12526 [skottie] Clamp keyframe values
We can skip interpolation if |t| is out of range or the interval is
constant ("hold").

TBR=
Change-Id: I0602d36557f46592ab673201ed2b4a96d40dc461
Reviewed-on: https://skia-review.googlesource.com/99420
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-24 19:52:49 +00:00
Florin Malita
7b3415cb10 [skottie] "hold" keyframe support
TBR=

Change-Id: I5388bc5a5d24b3bbe3962b2da646719e95efe858
Reviewed-on: https://skia-review.googlesource.com/99281
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-24 16:37:20 +00:00
Florin Malita
35efaa8fd7 [sksg] Animator, Scene
Relocate some reusable logic from Skottie

TBR=
Change-Id: I8764e666c9f1127ed895ee1d16cd66d052469ac5
Reviewed-on: https://skia-review.googlesource.com/98160
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-22 18:31:17 +00:00
Florin Malita
54f65c473f Skotty -> Skottie
Change-Id: If8b6516024c69b0fc256208874f6666a4e70e12c
Reviewed-on: https://skia-review.googlesource.com/95241
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-17 14:15:36 +00:00