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

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

Issue 2671853003: [SPInvalidation] Use GeometryMapper in PaintLayerClipper for paint. (Closed)
Patch Set: Merge branch 'master' into paintlayerclipper Created 3 years, 10 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 0221ebd479261b209372fbe36a5248f80f54f0cc..8ca7790c047ef31c15bd3bf24fb324c0c64a2db2 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
@@ -119,8 +119,9 @@ class PaintArtifactCompositorTestWithPropertyTrees
}
void update(const PaintArtifact& artifact) {
- GeometryMapper geometryMapper;
- m_paintArtifactCompositor->update(artifact, nullptr, false, geometryMapper);
+ std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
+ m_paintArtifactCompositor->update(artifact, nullptr, false,
+ *geometryMapper);
m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers();
}
@@ -1509,9 +1510,9 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, OverlapTransform) {
EXPECT_FALSE(PaintArtifactCompositor::canMergeInto(
artifact, artifact.paintChunks()[2], pendingLayer2));
- GeometryMapper geometryMapper;
+ std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
EXPECT_TRUE(PaintArtifactCompositor::mightOverlap(
- artifact.paintChunks()[2], pendingLayer2, geometryMapper));
+ artifact.paintChunks()[2], pendingLayer2, *geometryMapper));
update(artifact);
@@ -1530,10 +1531,10 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, MightOverlap) {
paintChunk2.properties = defaultPaintChunkProperties();
paintChunk2.bounds = FloatRect(0, 0, 100, 100);
- GeometryMapper geometryMapper;
+ std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
PaintArtifactCompositor::PendingLayer pendingLayer(paintChunk);
EXPECT_TRUE(PaintArtifactCompositor::mightOverlap(paintChunk2, pendingLayer,
- geometryMapper));
+ *geometryMapper));
RefPtr<TransformPaintPropertyNode> transform =
TransformPaintPropertyNode::create(
@@ -1543,7 +1544,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, MightOverlap) {
paintChunk2.properties.propertyTreeState.setTransform(transform.get());
EXPECT_TRUE(PaintArtifactCompositor::mightOverlap(paintChunk2, pendingLayer,
- geometryMapper));
+ *geometryMapper));
RefPtr<TransformPaintPropertyNode> transform2 =
TransformPaintPropertyNode::create(
@@ -1553,7 +1554,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, MightOverlap) {
paintChunk2.properties.propertyTreeState.setTransform(transform2.get());
EXPECT_FALSE(PaintArtifactCompositor::mightOverlap(paintChunk2, pendingLayer,
- geometryMapper));
+ *geometryMapper));
}
TEST_F(PaintArtifactCompositorTestWithPropertyTrees, PendingLayer) {
@@ -1616,8 +1617,8 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, PendingLayerWithGeometry) {
chunk2.properties.propertyTreeState = chunk1.properties.propertyTreeState;
chunk2.properties.propertyTreeState.setTransform(transform);
chunk2.bounds = FloatRect(0, 0, 50, 60);
- GeometryMapper geometryMapper;
- pendingLayer.add(chunk2, &geometryMapper);
+ std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
+ pendingLayer.add(chunk2, geometryMapper.get());
EXPECT_BLINK_FLOAT_RECT_EQ(FloatRect(0, 0, 70, 85), pendingLayer.bounds);
}

Powered by Google App Engine
This is Rietveld 408576698