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

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

Issue 2428513004: [SPv2] Create effect nodes for CSS filter (Closed)
Patch Set: address pdr's comment 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..dd6e74f80b95cb11308329e0b038e130f02179fe 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
@@ -37,10 +37,27 @@ 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(),
+ CompositorFilterOperations(), 1.0)));
+ return rootEffect;
}
class WebLayerTreeViewWithCompositorFrameSink
@@ -519,12 +536,15 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees,
}
TEST_F(PaintArtifactCompositorTestWithPropertyTrees, EffectTreeConversion) {
- RefPtr<EffectPaintPropertyNode> effect1 =
- EffectPaintPropertyNode::create(dummyRootEffect(), 0.5);
- RefPtr<EffectPaintPropertyNode> effect2 =
- EffectPaintPropertyNode::create(effect1, 0.3);
- RefPtr<EffectPaintPropertyNode> effect3 =
- EffectPaintPropertyNode::create(dummyRootEffect(), 0.2);
+ RefPtr<EffectPaintPropertyNode> effect1 = EffectPaintPropertyNode::create(
+ dummyRootEffect(), dummyRootTransform(), dummyRootClip(),
+ CompositorFilterOperations(), 0.5);
+ RefPtr<EffectPaintPropertyNode> effect2 = EffectPaintPropertyNode::create(
+ effect1, dummyRootTransform(), dummyRootClip(),
+ CompositorFilterOperations(), 0.3);
+ RefPtr<EffectPaintPropertyNode> effect3 = EffectPaintPropertyNode::create(
+ dummyRootEffect(), dummyRootTransform(), dummyRootClip(),
+ CompositorFilterOperations(), 0.2);
TestPaintArtifact artifact;
artifact.chunk(nullptr, nullptr, effect2.get())
@@ -598,8 +618,9 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, OneScrollNode) {
}
TEST_F(PaintArtifactCompositorTestWithPropertyTrees, NestedScrollNodes) {
- RefPtr<EffectPaintPropertyNode> effect =
- EffectPaintPropertyNode::create(dummyRootEffect(), 0.5);
+ RefPtr<EffectPaintPropertyNode> effect = EffectPaintPropertyNode::create(
+ dummyRootEffect(), dummyRootTransform(), dummyRootClip(),
+ CompositorFilterOperations(), 0.5);
RefPtr<TransformPaintPropertyNode> scrollTranslationA =
TransformPaintPropertyNode::create(

Powered by Google App Engine
This is Rietveld 408576698