Index: third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp |
index 88464d294527d7570529445b352ed84bfae8b962..d8385c91dccb1efcc82b930a1d197d0de30b94b9 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp |
@@ -17,7 +17,30 @@ namespace { |
// bots. |
#if defined(NDEBUG) || !OS(WIN) |
-static PaintChunkProperties rootPaintChunkProperties() { |
+TransformPaintPropertyNode* dummyRootTransform() { |
pdr.
2016/10/22 03:58:37
Potential followup: WDYT of adding a superclass th
trchen
2016/10/24 21:53:20
I'm thinking to move the static root nodes to Sour
|
+ 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, rootEffect, |
+ (EffectPaintPropertyNode::create( |
+ nullptr, dummyRootTransform(), dummyRootClip(), |
+ CompositorFilterOperations(), 1.0))); |
+ return rootEffect; |
+} |
+ |
+PaintChunkProperties rootPaintChunkProperties() { |
return PaintChunkProperties(); |
} |
@@ -147,8 +170,9 @@ TEST_F(PaintChunkerTest, BuildMultipleChunksWithDifferentPropertyChanges) { |
PaintChunkProperties simpleTransformAndEffect; |
simpleTransformAndEffect.transform = simpleTransform.transform; |
- simpleTransformAndEffect.effect = |
- EffectPaintPropertyNode::create(nullptr, 0.5f); |
+ simpleTransformAndEffect.effect = EffectPaintPropertyNode::create( |
+ dummyRootEffect(), dummyRootTransform(), dummyRootClip(), |
+ CompositorFilterOperations(), 0.5f); |
chunker.updateCurrentPaintChunkProperties(nullptr, simpleTransformAndEffect); |
chunker.incrementDisplayItemIndex(NormalTestDisplayItem()); |
chunker.incrementDisplayItemIndex(NormalTestDisplayItem()); |
@@ -160,7 +184,9 @@ TEST_F(PaintChunkerTest, BuildMultipleChunksWithDifferentPropertyChanges) { |
FloatPoint3D(9, 8, 7)); |
simpleTransformAndEffectWithUpdatedTransform.effect = |
EffectPaintPropertyNode::create( |
- nullptr, simpleTransformAndEffect.effect->opacity()); |
+ dummyRootEffect(), dummyRootTransform(), dummyRootClip(), |
+ CompositorFilterOperations(), |
+ simpleTransformAndEffect.effect->opacity()); |
chunker.updateCurrentPaintChunkProperties( |
nullptr, simpleTransformAndEffectWithUpdatedTransform); |
chunker.incrementDisplayItemIndex(NormalTestDisplayItem()); |