Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp |
| index 8f71334dc567eca169afbafd575a16064c4f7282..cc65b30362647a012ad22b2236ce6a116cb7b31f 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp |
| @@ -27,7 +27,7 @@ FloatClipRect& GeometryMapper::tempRect() { |
| void GeometryMapper::sourceToDestinationVisualRect( |
| const PropertyTreeState& sourceState, |
| const PropertyTreeState& destinationState, |
| - FloatRect& rect) { |
| + FloatClipRect& rect) { |
| bool success = false; |
| sourceToDestinationVisualRectInternal(sourceState, destinationState, rect, |
| success); |
| @@ -37,7 +37,7 @@ void GeometryMapper::sourceToDestinationVisualRect( |
| void GeometryMapper::sourceToDestinationVisualRectInternal( |
| const PropertyTreeState& sourceState, |
| const PropertyTreeState& destinationState, |
| - FloatRect& mappingRect, |
| + FloatClipRect& mappingRect, |
| bool& success) { |
| localToAncestorVisualRectInternal(sourceState, destinationState, mappingRect, |
| success); |
| @@ -61,7 +61,8 @@ void GeometryMapper::sourceToDestinationVisualRectInternal( |
| if (!success) |
| return; |
| - ancestorToLocalRect(lcaTransform, destinationState.transform(), mappingRect); |
| + ancestorToLocalRect(lcaTransform, destinationState.transform(), |
| + mappingRect.rect()); |
| } |
| void GeometryMapper::sourceToDestinationRect( |
| @@ -87,7 +88,7 @@ void GeometryMapper::sourceToDestinationRect( |
| void GeometryMapper::localToAncestorVisualRect( |
| const PropertyTreeState& localState, |
| const PropertyTreeState& ancestorState, |
| - FloatRect& mappingRect) { |
| + FloatClipRect& mappingRect) { |
| bool success = false; |
| localToAncestorVisualRectInternal(localState, ancestorState, mappingRect, |
| success); |
| @@ -97,7 +98,7 @@ void GeometryMapper::localToAncestorVisualRect( |
| void GeometryMapper::localToAncestorVisualRectInternal( |
| const PropertyTreeState& localState, |
| const PropertyTreeState& ancestorState, |
| - FloatRect& rectToMap, |
| + FloatClipRect& rectToMap, |
| bool& success) { |
| if (localState == ancestorState) { |
| success = true; |
| @@ -116,14 +117,14 @@ void GeometryMapper::localToAncestorVisualRectInternal( |
| return; |
| } |
| - FloatRect mappedRect = transformMatrix.mapRect(rectToMap); |
| + FloatRect mappedRect = transformMatrix.mapRect(rectToMap.rect()); |
| - const FloatClipRect& clipRect = |
| + FloatClipRect clipRect = |
| localToAncestorClipRectInternal(localState.clip(), ancestorState.clip(), |
| ancestorState.transform(), success); |
| if (success) { |
| - rectToMap = clipRect.rect(); |
| + rectToMap = clipRect; |
|
wkorman
2017/04/05 20:06:47
It looks like (but please confirm) this is the cri
chrishtr
2017/04/05 20:22:15
Done.
|
| rectToMap.intersect(mappedRect); |
| } else if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| // On SPv1 we may fail when the paint invalidation container creates an |
| @@ -139,7 +140,7 @@ void GeometryMapper::localToAncestorVisualRectInternal( |
| void GeometryMapper::slowLocalToAncestorVisualRectWithEffects( |
| const PropertyTreeState& localState, |
| const PropertyTreeState& ancestorState, |
| - FloatRect& mappingRect, |
| + FloatClipRect& mappingRect, |
| bool& success) { |
| PropertyTreeState lastTransformAndClipState(localState.transform(), |
| localState.clip(), nullptr); |
| @@ -156,7 +157,7 @@ void GeometryMapper::slowLocalToAncestorVisualRectWithEffects( |
| if (!success) |
| return; |
| - mappingRect = effect->mapRect(mappingRect); |
| + mappingRect.setRect(effect->mapRect(mappingRect.rect())); |
| lastTransformAndClipState = transformAndClipState; |
| } |