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

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 b5dbf83aa833a08b1bb4cc6993496d87a37f927b..0ba903455246929c75bfed3cef6c3f3254ae12c0 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, SkBlendMode::kSrcOver, 1, &paintInvalidationRect);
+ object, SkBlendMode::kSrcOver, 1, &visualRect);
return true;
}
@@ -37,18 +36,16 @@ 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, SkBlendMode::kDstIn, 1,
- &paintInvalidationRect,
- maskLayerFilter);
+ &visualRect, maskLayerFilter);
drawMaskForLayoutObject(context, object, object.objectBoundingBox(),
- paintInvalidationRect);
+ visualRect);
}
context.getPaintController().endItem<EndCompositingDisplayItem>(object);
@@ -58,7 +55,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 +64,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());
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGMaskPainter.h ('k') | third_party/WebKit/Source/core/paint/SVGPaintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698