| Index: third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp b/third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp
|
| index 73e5b2a3f348ee3ff65a6470b5925341ffb49275..a47625603b28d7f42dd26dfa05b0cb1e214f7b63 100644
|
| --- a/third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp
|
| @@ -22,13 +22,12 @@ bool SVGMaskPainter::prepareEffect(const LayoutObject& object,
|
|
|
| m_mask.clearInvalidationMask();
|
|
|
| - FloatRect paintInvalidationRect =
|
| - object.paintInvalidationRectInLocalSVGCoordinates();
|
| - if (paintInvalidationRect.isEmpty() || !m_mask.element()->hasChildren())
|
| + FloatRect visualRect = object.visualRectInLocalSVGCoordinates();
|
| + if (visualRect.isEmpty() || !m_mask.element()->hasChildren())
|
| return false;
|
|
|
| context.getPaintController().createAndAppend<BeginCompositingDisplayItem>(
|
| - object, SkXfermode::kSrcOver_Mode, 1, &paintInvalidationRect);
|
| + object, SkXfermode::kSrcOver_Mode, 1, &visualRect);
|
| return true;
|
| }
|
|
|
| @@ -37,18 +36,17 @@ void SVGMaskPainter::finishEffect(const LayoutObject& object,
|
| ASSERT(m_mask.style());
|
| SECURITY_DCHECK(!m_mask.needsLayout());
|
|
|
| - FloatRect paintInvalidationRect =
|
| - object.paintInvalidationRectInLocalSVGCoordinates();
|
| + FloatRect visualRect = object.visualRectInLocalSVGCoordinates();
|
| {
|
| ColorFilter maskLayerFilter =
|
| m_mask.style()->svgStyle().maskType() == MT_LUMINANCE
|
| ? ColorFilterLuminanceToAlpha
|
| : ColorFilterNone;
|
| - CompositingRecorder maskCompositing(
|
| - context, object, SkXfermode::kDstIn_Mode, 1, &paintInvalidationRect,
|
| - maskLayerFilter);
|
| + CompositingRecorder maskCompositing(context, object,
|
| + SkXfermode::kDstIn_Mode, 1, &visualRect,
|
| + maskLayerFilter);
|
| drawMaskForLayoutObject(context, object, object.objectBoundingBox(),
|
| - paintInvalidationRect);
|
| + visualRect);
|
| }
|
|
|
| context.getPaintController().endItem<EndCompositingDisplayItem>(object);
|
| @@ -58,7 +56,7 @@ void SVGMaskPainter::drawMaskForLayoutObject(
|
| GraphicsContext& context,
|
| const LayoutObject& layoutObject,
|
| const FloatRect& targetBoundingBox,
|
| - const FloatRect& targetPaintInvalidationRect) {
|
| + const FloatRect& targetVisualRect) {
|
| AffineTransform contentTransformation;
|
| sk_sp<const SkPicture> maskContentPicture = m_mask.createContentPicture(
|
| contentTransformation, targetBoundingBox, context);
|
| @@ -67,9 +65,8 @@ void SVGMaskPainter::drawMaskForLayoutObject(
|
| context, layoutObject, DisplayItem::kSVGMask))
|
| return;
|
|
|
| - LayoutObjectDrawingRecorder drawingRecorder(context, layoutObject,
|
| - DisplayItem::kSVGMask,
|
| - targetPaintInvalidationRect);
|
| + LayoutObjectDrawingRecorder drawingRecorder(
|
| + context, layoutObject, DisplayItem::kSVGMask, targetVisualRect);
|
| context.save();
|
| context.concatCTM(contentTransformation);
|
| context.drawPicture(maskContentPicture.get());
|
|
|