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

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

Issue 1184633004: Fix masking cull rects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No bounding boxes! Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGMaskPainter.cpp
diff --git a/Source/core/paint/SVGMaskPainter.cpp b/Source/core/paint/SVGMaskPainter.cpp
index d1c326f1571c434d4f592f285ca049d17f201bc1..16bc9d1fc75253fcb47015d472b595f8809584e3 100644
--- a/Source/core/paint/SVGMaskPainter.cpp
+++ b/Source/core/paint/SVGMaskPainter.cpp
@@ -74,10 +74,15 @@ void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay
RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(contentTransformation, targetBoundingBox);
TransformRecorder recorder(*context, layoutObject, contentTransformation);
-
- LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGMask, LayoutRect::infiniteIntRect());
- if (!drawingRecorder.canUseCachedDrawing())
- context->drawPicture(maskContentPicture.get());
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
+ ASSERT(context->displayItemList());
+ if (context->displayItemList()->displayItemConstructionIsDisabled())
+ return;
+ context->displayItemList()->add(DrawingDisplayItem::create(layoutObject, DisplayItem::SVGMask, maskContentPicture));
+ } else {
+ DrawingDisplayItem maskPicture(layoutObject, DisplayItem::SVGClip, maskContentPicture);
+ maskPicture.replay(*context);
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698