[skottie] Nested animation support
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>
diff --git a/tools/viewer/SkottieSlide.cpp b/tools/viewer/SkottieSlide.cpp
index aef28e1..77501d8 100644
--- a/tools/viewer/SkottieSlide.cpp
+++ b/tools/viewer/SkottieSlide.cpp
@@ -17,9 +17,9 @@
}
void SkottieSlide::load(SkScalar w, SkScalar h) {
- fAnimation = skottie::Animation::MakeFromFile(fPath.c_str());
- fWinSize = SkSize::Make(w, h);
- fTimeBase = 0; // force a time reset
+ fAnimation = skottie::Animation::MakeFromFile(fPath.c_str());
+ fWinSize = SkSize::Make(w, h);
+ fTimeBase = 0; // force a time reset
if (fAnimation) {
fAnimation->setShowInval(fShowAnimationInval);