skia2/tools/viewer
Florin Malita fbddfbb9f3 [skottie] Introduce an external layer API
Add support for external precomp Skottie layers.  This allows embedders
to seamlessly mix custom/Lottie content.

General flow:

  * embedders register a PrecompInterceptor callback with
    the animation builder
  * at build time, Skottie invokes the callback for each pre-composed
    layer
    - the returned ExternalLayer implementation is used instead of the
      Lottie layer payload
    - (a nullptr value signals Skottie to use the usual Lottie payload)
  * at render time, ExternalLayer::render() is called to defer content
    rendering to the embedder

Also implement a sample PrecompInterceptor which attempts to substitute
precmp layers matching a given pattern with external Lottie animations:

   precomp_name: "__foo.json"  -> Animation("foo.json")

This new mechanism is a generalization of (and supersedes) the old
NestedAnimation hack - so we can remove that.

Change-Id: Id80fe11881c62b8717c2476117c7c03ad5300eef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288130
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2020-05-06 20:31:14 +00:00
..
AnimTimer.h tools: separate TimeUtils from AnimTimer 2019-07-12 15:05:01 +00:00
BisectSlide.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
BisectSlide.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
GMSlide.cpp Clean up some gm factory use. 2019-08-13 15:57:37 +00:00
GMSlide.h Clean up some gm factory use. 2019-08-13 15:57:37 +00:00
ImageSlide.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
ImageSlide.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
ImGuiLayer.cpp tools/skui: put all enums in a common namespace 2019-08-29 15:39:32 +00:00
ImGuiLayer.h Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
ParticlesSlide.cpp Pure SkSL RNG for particles 2020-04-10 17:20:07 +00:00
ParticlesSlide.h Particles: Remove play-position thing, simplify mouse tracking 2019-12-05 20:07:13 +00:00
SampleSlide.cpp tools/skui: put all enums in a common namespace 2019-08-29 15:39:32 +00:00
SampleSlide.h tools/skui: put all enums in a common namespace 2019-08-29 15:39:32 +00:00
SkottieSlide.cpp [skottie] Introduce an external layer API 2020-05-06 20:31:14 +00:00
SkottieSlide.h [skottie] Add SkottieSlide frame rate UI option 2019-12-11 22:40:42 +00:00
SKPSlide.cpp Hook up pinch-zoom and swipe gestures. 2019-09-10 13:34:47 +00:00
SKPSlide.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSLSlide.cpp Remove GrAtlasManager.h from all other .h files 2020-04-07 12:43:46 +00:00
SkSLSlide.h Handle runtime effect shader errors better 2020-03-06 21:32:31 +00:00
Slide.h tools/skui: put all enums in a common namespace 2019-08-29 15:39:32 +00:00
SlideDir.cpp update skstd 2020-04-30 15:05:43 +00:00
SlideDir.h [skottie] Cleanup: relocate Animator base class out of SkSG 2020-03-26 20:50:10 +00:00
StatsLayer.cpp Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
StatsLayer.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SvgSlide.cpp [svg] Adjust container size on Viewer window resize 2020-04-09 12:16:34 +00:00
SvgSlide.h [svg] Adjust container size on Viewer window resize 2020-04-09 12:16:34 +00:00
TouchGesture.cpp Hook up pinch-zoom and swipe gestures. 2019-09-10 13:34:47 +00:00
TouchGesture.h Hook up pinch-zoom and swipe gestures. 2019-09-10 13:34:47 +00:00
Viewer.cpp Limit the Viewer MSAA options to the context's max sample count. 2020-05-06 19:54:44 +00:00
Viewer.h add draw-via-serialize mode to viewer 2020-03-12 18:36:27 +00:00