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

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

Issue 2743733004: Revert of Reduce copying of local data structures in GeometryMapper and PaintLayerClipper. (Closed)
Patch Set: Created 3 years, 9 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/PaintArtifactCompositor.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
index b0927fb6f0083d066c36fc70bf457ef6e6bc8596..9050f4972e6fa2d81ad03f4a3c52c80b58560504 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -289,11 +289,11 @@
}
#endif
- const FloatClipRect& combinedClip =
- geometryMapper.localToAncestorClipRect(localState, ancestorState);
+ FloatRect combinedClip =
+ geometryMapper.localToAncestorClipRect(localState, ancestorState).rect();
ccList.CreateAndAppendPairedBeginItem<cc::FloatClipDisplayItem>(
- gfx::RectF(combinedClip.rect()));
+ gfx::RectF(combinedClip));
endDisplayItems.push_back(EndClip);
}
@@ -604,15 +604,19 @@
ClipPaintPropertyNode::root(),
EffectPaintPropertyNode::root());
- FloatRect paintChunkScreenVisualRect = paintChunk.bounds;
- geometryMapper.localToAncestorVisualRect(
- paintChunk.properties.propertyTreeState, rootPropertyTreeState,
- paintChunkScreenVisualRect);
-
- FloatRect pendingLayerScreenVisualRect = candidatePendingLayer.bounds;
- geometryMapper.localToAncestorVisualRect(
- candidatePendingLayer.propertyTreeState, rootPropertyTreeState,
- pendingLayerScreenVisualRect);
+ FloatRect paintChunkScreenVisualRect =
+ geometryMapper
+ .localToAncestorVisualRect(paintChunk.bounds,
+ paintChunk.properties.propertyTreeState,
+ rootPropertyTreeState)
+ .rect();
+
+ FloatRect pendingLayerScreenVisualRect =
+ geometryMapper
+ .localToAncestorVisualRect(candidatePendingLayer.bounds,
+ candidatePendingLayer.propertyTreeState,
+ rootPropertyTreeState)
+ .rect();
return paintChunkScreenVisualRect.intersects(pendingLayerScreenVisualRect);
}
@@ -633,9 +637,9 @@
paintChunks.push_back(&paintChunk);
FloatRect mappedBounds = paintChunk.bounds;
if (geometryMapper) {
- geometryMapper->localToAncestorRect(
- paintChunk.properties.propertyTreeState.transform(),
- propertyTreeState.transform(), mappedBounds);
+ mappedBounds = geometryMapper->localToAncestorRect(
+ mappedBounds, paintChunk.properties.propertyTreeState.transform(),
+ propertyTreeState.transform());
}
bounds.unite(mappedBounds);
if (bounds.size() != paintChunks[0]->bounds.size()) {

Powered by Google App Engine
This is Rietveld 408576698