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

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

Issue 2465983002: Rename "paint invalidation rect" etc. to "visual rect". (Closed)
Patch Set: - Created 4 years, 1 month 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/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());

Powered by Google App Engine
This is Rietveld 408576698