[skottie] Expose composition markers to embedders
Add a MarkerObserver interface (to replace the current
AnnotationObserver), and update CustomPropertyManager to intercept both
properties and markers.
TBR=
Change-Id: If79de419066916bc596316f0a551c75564069239
Reviewed-on: https://skia-review.googlesource.com/c/173766
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/modules/skottie/gm/SkottieGM.cpp b/modules/skottie/gm/SkottieGM.cpp
index 8febf25..c8a4a27 100644
--- a/modules/skottie/gm/SkottieGM.cpp
+++ b/modules/skottie/gm/SkottieGM.cpp
@@ -104,11 +104,10 @@
void onOnceBeforeDraw() override {
if (auto stream = GetResourceAsStream("skottie/skottie_sample_search.json")) {
- auto propBuilder = sk_make_sp<CustomPropertyManagerBuilder>();
+ fPropManager = skstd::make_unique<CustomPropertyManager>();
fAnimation = Animation::Builder()
- .setPropertyObserver(propBuilder)
+ .setPropertyObserver(fPropManager->getPropertyObserver())
.make(stream.get());
- fPropManager = propBuilder->build();
fColors = fPropManager->getColorProps();
}
}