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

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

Issue 2428513004: [SPv2] Create effect nodes for CSS filter (Closed)
Patch Set: remove DCHECK(layer) 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 b51754a8403b7e20aeb67ca240fca8a58c74db9a..411adbd4b76cc59053ba3bf2e28a4e302eee1ef5 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
@@ -520,12 +537,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())
@@ -599,8 +619,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