Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(973)

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp

Issue 2428513004: [SPv2] Create effect nodes for CSS filter (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
index 6a9cbf434d9c8e5debb49cc4c236ecec4ab83f60..72fce3afb5a22fd5a294b3c9085639805755993e 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
@@ -37,10 +37,25 @@ gfx::Transform translation(SkMScalar x, SkMScalar y) {
return transform;
}
+TransformPaintPropertyNode* dummyRootTransform() {
+ DEFINE_STATIC_REF(TransformPaintPropertyNode, rootTransform,
+ (TransformPaintPropertyNode::create(
+ nullptr, TransformationMatrix(), FloatPoint3D())));
+ return rootTransform;
+}
+
+ClipPaintPropertyNode* dummyRootClip() {
+ DEFINE_STATIC_REF(ClipPaintPropertyNode, rootClip,
+ (ClipPaintPropertyNode::create(
+ nullptr, dummyRootTransform(),
+ FloatRoundedRect(LayoutRect::infiniteIntRect()))));
+ return rootClip;
+}
+
EffectPaintPropertyNode* dummyRootEffect() {
- DEFINE_STATIC_REF(EffectPaintPropertyNode, node,
- EffectPaintPropertyNode::create(nullptr, 1.0));
- return node;
+ DEFINE_STATIC_REF(EffectPaintPropertyNode, rootEffect,
+ (EffectPaintPropertyNode::create(nullptr, dummyRootTransform(), dummyRootClip(), 1.0, CompositorFilterOperations())));
+ return rootEffect;
}
class WebLayerTreeViewWithCompositorFrameSink
@@ -520,11 +535,11 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees,
TEST_F(PaintArtifactCompositorTestWithPropertyTrees, EffectTreeConversion) {
RefPtr<EffectPaintPropertyNode> effect1 =
- EffectPaintPropertyNode::create(dummyRootEffect(), 0.5);
+ EffectPaintPropertyNode::create(dummyRootEffect(), dummyRootTransform(), dummyRootClip(), 0.5, CompositorFilterOperations());
RefPtr<EffectPaintPropertyNode> effect2 =
- EffectPaintPropertyNode::create(effect1, 0.3);
+ EffectPaintPropertyNode::create(effect1, dummyRootTransform(), dummyRootClip(), 0.3, CompositorFilterOperations());
RefPtr<EffectPaintPropertyNode> effect3 =
- EffectPaintPropertyNode::create(dummyRootEffect(), 0.2);
+ EffectPaintPropertyNode::create(dummyRootEffect(), dummyRootTransform(), dummyRootClip(), 0.2, CompositorFilterOperations());
TestPaintArtifact artifact;
artifact.chunk(nullptr, nullptr, effect2.get())
@@ -599,7 +614,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, OneScrollNode) {
TEST_F(PaintArtifactCompositorTestWithPropertyTrees, NestedScrollNodes) {
RefPtr<EffectPaintPropertyNode> effect =
- EffectPaintPropertyNode::create(dummyRootEffect(), 0.5);
+ EffectPaintPropertyNode::create(dummyRootEffect(), dummyRootTransform(), dummyRootClip(), 0.5, CompositorFilterOperations());
RefPtr<TransformPaintPropertyNode> scrollTranslationA =
TransformPaintPropertyNode::create(

Powered by Google App Engine
This is Rietveld 408576698