| 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 b580ccc81e60cc061945160e09bfafb97f44c7fb..6fdb064badbc151deabc4acf4f4e4f3957001362 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
|
| @@ -18,7 +18,6 @@
|
| #include "cc/trees/scroll_node.h"
|
| #include "cc/trees/transform_node.h"
|
| #include "platform/graphics/paint/EffectPaintPropertyNode.h"
|
| -#include "platform/graphics/paint/GeometryMapper.h"
|
| #include "platform/graphics/paint/PaintArtifact.h"
|
| #include "platform/graphics/paint/ScrollPaintPropertyNode.h"
|
| #include "platform/testing/PaintPropertyTestHelpers.h"
|
| @@ -120,9 +119,7 @@ class PaintArtifactCompositorTestWithPropertyTrees
|
| }
|
|
|
| void update(const PaintArtifact& artifact) {
|
| - std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
|
| - m_paintArtifactCompositor->update(artifact, nullptr, false,
|
| - *geometryMapper);
|
| + m_paintArtifactCompositor->update(artifact, nullptr, false);
|
| m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers();
|
| }
|
|
|
| @@ -1445,12 +1442,10 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, MightOverlap) {
|
| paintChunk2.properties = defaultPaintChunkProperties();
|
| paintChunk2.bounds = FloatRect(0, 0, 100, 100);
|
|
|
| - std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
|
| -
|
| {
|
| PaintArtifactCompositor::PendingLayer pendingLayer2(paintChunk2, false);
|
| - EXPECT_TRUE(PaintArtifactCompositor::mightOverlap(
|
| - pendingLayer, pendingLayer2, *geometryMapper));
|
| + EXPECT_TRUE(
|
| + PaintArtifactCompositor::mightOverlap(pendingLayer, pendingLayer2));
|
| }
|
|
|
| RefPtr<TransformPaintPropertyNode> transform =
|
| @@ -1461,8 +1456,8 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, MightOverlap) {
|
| {
|
| paintChunk2.properties.propertyTreeState.setTransform(transform.get());
|
| PaintArtifactCompositor::PendingLayer pendingLayer2(paintChunk2, false);
|
| - EXPECT_TRUE(PaintArtifactCompositor::mightOverlap(
|
| - pendingLayer, pendingLayer2, *geometryMapper));
|
| + EXPECT_TRUE(
|
| + PaintArtifactCompositor::mightOverlap(pendingLayer, pendingLayer2));
|
| }
|
|
|
| RefPtr<TransformPaintPropertyNode> transform2 =
|
| @@ -1473,14 +1468,12 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, MightOverlap) {
|
| {
|
| paintChunk2.properties.propertyTreeState.setTransform(transform2.get());
|
| PaintArtifactCompositor::PendingLayer pendingLayer2(paintChunk2, false);
|
| - EXPECT_FALSE(PaintArtifactCompositor::mightOverlap(
|
| - pendingLayer, pendingLayer2, *geometryMapper));
|
| + EXPECT_FALSE(
|
| + PaintArtifactCompositor::mightOverlap(pendingLayer, pendingLayer2));
|
| }
|
| }
|
|
|
| TEST_F(PaintArtifactCompositorTestWithPropertyTrees, PendingLayer) {
|
| - std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
|
| -
|
| PaintChunk chunk1;
|
| chunk1.properties.propertyTreeState = PropertyTreeState(
|
| TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(),
|
| @@ -1500,8 +1493,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, PendingLayer) {
|
| chunk2.properties.backfaceHidden = true;
|
| chunk2.knownToBeOpaque = true;
|
| chunk2.bounds = FloatRect(10, 20, 30, 40);
|
| - pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk2, false),
|
| - *geometryMapper);
|
| + pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk2, false));
|
|
|
| EXPECT_TRUE(pendingLayer.backfaceHidden);
|
| // Bounds not equal to one PaintChunk.
|
| @@ -1513,8 +1505,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, PendingLayer) {
|
| chunk3.properties.backfaceHidden = true;
|
| chunk3.knownToBeOpaque = true;
|
| chunk3.bounds = FloatRect(-5, -25, 20, 20);
|
| - pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk3, false),
|
| - *geometryMapper);
|
| + pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk3, false));
|
|
|
| EXPECT_TRUE(pendingLayer.backfaceHidden);
|
| EXPECT_FALSE(pendingLayer.knownToBeOpaque);
|
| @@ -1542,9 +1533,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, PendingLayerWithGeometry) {
|
| chunk2.properties.propertyTreeState = chunk1.properties.propertyTreeState;
|
| chunk2.properties.propertyTreeState.setTransform(transform);
|
| chunk2.bounds = FloatRect(0, 0, 50, 60);
|
| - std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
|
| - pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk2, false),
|
| - *geometryMapper);
|
| + pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk2, false));
|
|
|
| EXPECT_BLINK_FLOAT_RECT_EQ(FloatRect(0, 0, 70, 85), pendingLayer.bounds);
|
| }
|
| @@ -1553,8 +1542,6 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, PendingLayerWithGeometry) {
|
| // The test is disabled because opaque rect mapping is not implemented yet.
|
| TEST_F(PaintArtifactCompositorTestWithPropertyTrees,
|
| PendingLayerKnownOpaque_DISABLED) {
|
| - std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
|
| -
|
| PaintChunk chunk1;
|
| chunk1.properties.propertyTreeState = PropertyTreeState(
|
| TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(),
|
| @@ -1569,8 +1556,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees,
|
| chunk2.properties.propertyTreeState = chunk1.properties.propertyTreeState;
|
| chunk2.bounds = FloatRect(0, 0, 25, 35);
|
| chunk2.knownToBeOpaque = true;
|
| - pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk2, false),
|
| - *geometryMapper);
|
| + pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk2, false));
|
|
|
| // Chunk 2 doesn't cover the entire layer, so not opaque.
|
| EXPECT_FALSE(pendingLayer.knownToBeOpaque);
|
| @@ -1579,8 +1565,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees,
|
| chunk3.properties.propertyTreeState = chunk1.properties.propertyTreeState;
|
| chunk3.bounds = FloatRect(0, 0, 50, 60);
|
| chunk3.knownToBeOpaque = true;
|
| - pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk3, false),
|
| - *geometryMapper);
|
| + pendingLayer.merge(PaintArtifactCompositor::PendingLayer(chunk3, false));
|
|
|
| // Chunk 3 covers the entire layer, so now it's opaque.
|
| EXPECT_TRUE(pendingLayer.knownToBeOpaque);
|
|
|