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

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

Issue 2390443002: Unify GeometryPropertyTreeState and PropertyTreeState (Closed)
Patch Set: rebase x2 Created 4 years, 2 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 6e036341920c2f343f38395e689fca2b8c2ec578..8cf10b39826f004f5284137a1a6c6e1544b3275d 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -83,24 +83,24 @@ static LayoutRect mapLocalRectToPaintInvalidationBacking(
} else {
rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset));
- GeometryPropertyTreeState currentTreeState(
+ PropertyTreeState currentTreeState(
context.treeBuilderContext.current.transform,
context.treeBuilderContext.current.clip,
- context.treeBuilderContext.currentEffect);
- GeometryPropertyTreeState containerTreeState;
+ context.treeBuilderContext.currentEffect,
+ context.treeBuilderContext.current.scroll);
const ObjectPaintProperties* containerPaintProperties =
context.paintInvalidationContainer->objectPaintProperties();
- LayoutPoint paintOffsetFromContainerTreeState;
- containerPaintProperties->getContentsPropertyTreeState(
- containerTreeState, paintOffsetFromContainerTreeState);
+ auto containerContentsProperties =
+ containerPaintProperties->contentsProperties();
bool success = false;
result = LayoutRect(geometryMapper.mapToVisualRectInDestinationSpace(
- rect, currentTreeState, containerTreeState, success));
+ rect, currentTreeState, containerContentsProperties.propertyTreeState,
+ success));
DCHECK(success);
- // Convert the result from containerTreeState space to the container's contents space.
- result.moveBy(-paintOffsetFromContainerTreeState);
+ // Convert the result to the container's contents space.
+ result.moveBy(-containerContentsProperties.paintOffset);
}
if (context.paintInvalidationContainer->layer()->groupedMapping())
@@ -144,26 +144,26 @@ LayoutPoint PaintInvalidator::computeLocationFromPaintInvalidationBacking(
if (object != context.paintInvalidationContainer) {
point.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset));
- GeometryPropertyTreeState currentTreeState(
+ PropertyTreeState currentTreeState(
context.treeBuilderContext.current.transform,
context.treeBuilderContext.current.clip,
- context.treeBuilderContext.currentEffect);
- GeometryPropertyTreeState containerTreeState;
- LayoutPoint paintOffsetFromContainerTreeState;
- context.paintInvalidationContainer->objectPaintProperties()
- ->getContentsPropertyTreeState(containerTreeState,
- paintOffsetFromContainerTreeState);
+ context.treeBuilderContext.currentEffect,
+ context.treeBuilderContext.current.scroll);
+ const ObjectPaintProperties* containerPaintProperties =
+ context.paintInvalidationContainer->objectPaintProperties();
+ auto containerContentsProperties =
+ containerPaintProperties->contentsProperties();
bool success = false;
point = m_geometryMapper
- .mapRectToDestinationSpace(FloatRect(point, FloatSize()),
- currentTreeState, containerTreeState,
- success)
+ .mapRectToDestinationSpace(
+ FloatRect(point, FloatSize()), currentTreeState,
+ containerContentsProperties.propertyTreeState, success)
.location();
DCHECK(success);
- // Convert the result from containerTreeState space to the container's contents space.
- point.moveBy(-paintOffsetFromContainerTreeState);
+ // Convert the result to the container's contents space.
+ point.moveBy(-containerContentsProperties.paintOffset);
}
if (context.paintInvalidationContainer->layer()->groupedMapping())

Powered by Google App Engine
This is Rietveld 408576698