Initial Lottie loader impl (Skotty)
Coarse workflow:
* Construction
1) build a Json tree
2) collect asset IDs (for preComp/image layer resolution)
3) "attach" pass
- traverse the Json tree
- build an SkSG dom, one fragment at a time
- attach "animator" objects to the dom, for each animated prop
4) done, we can throw away the Json tree
* For each animation tick
1) iterate over active animators and poke their respective dom nodes/attributes
2) revalidate the SkSG dom
3) draw the SkSG dom
Note: post construction, things are super-simple - we just poke SkSG DOM attributes
with interpolated values, and everything else is handled by SkSG (invalidation,
revalidation, render).
Change-Id: I96a02be7eb4fb4cb3831f59bf2b3908ea190c0dd
Reviewed-on: https://skia-review.googlesource.com/89420
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 31537cf..a61bff7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1320,6 +1320,21 @@
]
}
+ test_lib("experimental_skotty") {
+ public_include_dirs = [ "experimental/skotty" ]
+ include_dirs = [ "tools" ]
+ sources = [
+ "experimental/skotty/Skotty.cpp",
+ "experimental/skotty/SkottyAnimator.cpp",
+ "experimental/skotty/SkottyProperties.cpp",
+ ]
+ deps = [
+ ":experimental_sksg",
+ ":skia",
+ "//third_party/jsoncpp",
+ ]
+ }
+
test_lib("experimental_svg_model") {
public_include_dirs = [ "experimental/svg/model" ]
sources = [
@@ -1877,6 +1892,7 @@
"tools/viewer/ImageSlide.cpp",
"tools/viewer/SKPSlide.cpp",
"tools/viewer/SampleSlide.cpp",
+ "tools/viewer/SkottySlide.cpp",
"tools/viewer/StatsLayer.cpp",
"tools/viewer/Viewer.cpp",
]
@@ -1884,6 +1900,7 @@
include_dirs = []
deps = [
+ ":experimental_skotty",
":flags",
":gm",
":gpu_tool_utils",