[go: nahoru, domu]

Plumb SkottiePropertyTextValueMap through rendering pipeline.

* Add text map as argument to canvas drawSkottie() methods.
* Add serialization/deserialization of text map (with a little
  refactoring to keep it "clean").
* Apply text map to skottie animation object.

Bug: b:217271404

Cq-Include-Trybots: luci.chrome.try:linux-chromeos-chrome
Change-Id: I7e69b652533d8048dca072d7b2290b0d5799e26b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3472277
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Eric Sum <esum@google.com>
Cr-Commit-Position: refs/heads/main@{#973815}
diff --git a/cc/paint/paint_canvas.h b/cc/paint/paint_canvas.h
index 3e05b74..bd32f3d 100644
--- a/cc/paint/paint_canvas.h
+++ b/cc/paint/paint_canvas.h
@@ -14,6 +14,7 @@
 #include "cc/paint/paint_image.h"
 #include "cc/paint/skottie_color_map.h"
 #include "cc/paint/skottie_frame_data.h"
+#include "cc/paint/skottie_text_property_value.h"
 #include "third_party/skia/include/core/SkCanvas.h"
 
 class SkTextBlob;
@@ -192,7 +193,8 @@
                            const SkRect& dst,
                            float t,
                            SkottieFrameDataMap images,
-                           const SkottieColorMap& color_map) = 0;
+                           const SkottieColorMap& color_map,
+                           SkottieTextPropertyValueMap text_map) = 0;
 
   virtual void drawTextBlob(sk_sp<SkTextBlob> blob,
                             SkScalar x,