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

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

Issue 2671853003: [SPInvalidation] Use GeometryMapper in PaintLayerClipper for paint. (Closed)
Patch Set: none 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 5dd795ed2319cda2be1b601ba235d95e66dfd712..e7d3edd29b9f58657e8b4890773362bae6462f89 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
@@ -118,8 +118,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();
}
@@ -1508,9 +1509,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);
@@ -1529,10 +1530,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(
@@ -1542,7 +1543,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, MightOverlap) {
paintChunk2.properties.propertyTreeState.setTransform(transform.get());
EXPECT_TRUE(PaintArtifactCompositor::mightOverlap(paintChunk2, pendingLayer,
- geometryMapper));
+ *geometryMapper));
RefPtr<TransformPaintPropertyNode> transform2 =
TransformPaintPropertyNode::create(
@@ -1552,7 +1553,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, MightOverlap) {
paintChunk2.properties.propertyTreeState.setTransform(transform2.get());
EXPECT_FALSE(PaintArtifactCompositor::mightOverlap(paintChunk2, pendingLayer,
- geometryMapper));
+ *geometryMapper));
}
TEST_F(PaintArtifactCompositorTestWithPropertyTrees, PendingLayer) {
@@ -1615,8 +1616,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