[go: nahoru, domu]

Add paint_worklet_input_ to cc::PaintImage

When Blink paints, it will create an Image if it is by CSS Paint.
When this image is embedded in a display item list and passed to cc,
it would be a cc::PaintImage.

This CL makes a cc::PaintImage keeps a scoped_refptr to a PaintWorkletInput,
which contains all the input parameters that are necessary to execute
JS paint callbacks. Note that the PaintWorkletInput is a pure interface,
so for testing purpose, we create a class TestPaintWorkletInput.

Bug: 907897
Change-Id: I5f8562eaaf747fc6da723de11f0d668027f4469d
Reviewed-on: https://chromium-review.googlesource.com/c/1348259
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614064}
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 1c7b04e..4c0382a62 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -297,7 +297,6 @@
     "trees/layer_tree_impl.h",
     "trees/layer_tree_mutator.cc",
     "trees/layer_tree_mutator.h",
-    "trees/layer_tree_painter.h",
     "trees/layer_tree_settings.cc",
     "trees/layer_tree_settings.h",
     "trees/managed_memory_policy.cc",
@@ -496,6 +495,8 @@
     "test/test_occlusion_tracker.h",
     "test/test_options_provider.cc",
     "test/test_options_provider.h",
+    "test/test_paint_worklet_input.cc",
+    "test/test_paint_worklet_input.h",
     "test/test_skcanvas.cc",
     "test/test_skcanvas.h",
     "test/test_task_graph_runner.cc",