Apply the effect at revalidation time, and cache the result.
TBR=
Change-Id: I166fc0e4e2869bea51e5e45e5a2a50df2f034691
Reviewed-on: https://skia-review.googlesource.com/112801
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Extend composition layers to support referencing external .json
animations ("$"<PATH> syntax).
This is a custom extension (not supported in BM/Lottie).
Also make skottie::Animation ref-counted, to facilitate sharing.
TBR=
Change-Id: I062d031e5868d759f3930dea9b261f9b3ec81684
Reviewed-on: https://skia-review.googlesource.com/109806
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Change-Id: Ia303259e0e157d6066428183002748752fad3a7c
Reviewed-on: https://skia-review.googlesource.com/105606
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Looks like SkCubicMap can produce slightly out-of-range values.
That's prolly some unimportant precision artifact, but since we're
asserting t is in [0,1] down the line it'd be nice to not crash in debug.
TBR=
Change-Id: I048b691d1c0f0977556d5b25893a6dab2b9986cc
Reviewed-on: https://skia-review.googlesource.com/102480
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Use the new node type for SkottieSlide2 labels.
TBR=
Change-Id: Icd6a4faf1c281bd83a2331c0072d1a6ed71acc09
Reviewed-on: https://skia-review.googlesource.com/102441
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Pre-compositions (only) can have their timelines adjusted via bias and
scale.
TBR=
Change-Id: I519fa1d7cf210f7f152dcabcbe004119a2cf08d9
Reviewed-on: https://skia-review.googlesource.com/101460
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
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>
This reverts commit ba3ed69a4e.
Reason for revert:
Looks like asset references can manipulate the timeline (preComps),
so we do need distinct instances for each ref.
May revisit in the future for cases where all instances share the same timeline.
Original change's description:
> [skottie] Cache attached assets
>
> This avoids redundant instantiations for assets referenced multiple
> times.
>
> TBR=
>
> Change-Id: I8f61f73e695f0d567e55ef077c7d3fb344399f12
> Reviewed-on: https://skia-review.googlesource.com/101002
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
TBR=fmalita@chromium.org
Change-Id: I3e537ace9dfbf69a11f421992db033a0f8ad2aa9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/101220
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
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>
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>
|offset| is an angular value in [0..360].
TBR=
Change-Id: I10a91bec7e8f43db1f54c8b5358dd0604c974998
Reviewed-on: https://skia-review.googlesource.com/98560
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Zero-width strokes imply hairline in Skia, but in other models (e.g.
Lottie) they are simply ignored. The latter approach avoids
discontinuities when width -> 0, so let's make it the default for sksg.
TBR=
Change-Id: I957a873c0e6468e21372115ed18cc7316fd2e7d1
Reviewed-on: https://skia-review.googlesource.com/97661
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
To fix gm/bigrect, needed to do adjust "largest" rect so it doesn't become empty when round-tripping with SkRect/SkIRect.
I renamed it after this.
Bug: skia:
Change-Id: I747782c8456da603cf298275d2300ea1996e7629
Reviewed-on: https://skia-review.googlesource.com/95563
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Force an initial tick on animation initialization.
This prevents inconsistent state flashing if the client starts rendering
before the first tick.
TBR=
Change-Id: Iaec3146b4085c980e6501d6a65dd8f2421a2895f
Reviewed-on: https://skia-review.googlesource.com/92740
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
No reason to punt through SkMSec, we just lose precision.
TBR=
Change-Id: I2f61e49658701a3b5a675f3dd44543fd9aa98708
Reviewed-on: https://skia-review.googlesource.com/92600
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>