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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2745563004: Reduce copying of local data structures in GeometryMapper and PaintLayerClipper. (Closed)
Patch Set: none 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/core/paint/PaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index 54bb8dc00a85b2f0d1823554bdbaef2251a1dafa..5a24c12c9076fde27c3ddc05a5974a9de7870edc 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -127,11 +127,11 @@ static LayoutRect mapLocalRectToPaintInvalidationBacking(
PropertyTreeState currentTreeState(
context.treeBuilderContext.current.transform,
context.treeBuilderContext.current.clip, nullptr);
- result = LayoutRect(
- geometryMapper
- .sourceToDestinationVisualRect(FloatRect(rect), currentTreeState,
- *containerContentsProperties)
- .rect());
+
+ FloatRect floatRect(rect);
+ geometryMapper.sourceToDestinationVisualRect(
+ currentTreeState, *containerContentsProperties, floatRect);
+ result = LayoutRect(floatRect);
}
// Convert the result to the container's contents space.
@@ -182,12 +182,11 @@ LayoutPoint PaintInvalidator::computeLocationInBacking(
->contentsProperties()
->transform();
if (context.treeBuilderContext.current.transform != containerTransform) {
- point = LayoutPoint(m_geometryMapper
- .sourceToDestinationRect(
- FloatRect(FloatPoint(point), FloatSize()),
- context.treeBuilderContext.current.transform,
- containerTransform)
- .location());
+ FloatRect rect = FloatRect(FloatPoint(point), FloatSize());
+ m_geometryMapper.sourceToDestinationRect(
+ context.treeBuilderContext.current.transform, containerTransform,
+ rect);
+ point = LayoutPoint(rect.location());
}
// Convert the result to the container's contents space.

Powered by Google App Engine
This is Rietveld 408576698