| 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(
|
|
|