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

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

Issue 1192443003: [Slimming Paint] Blink-side contiguous allocation of display items. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: need a constructor with WTF_MAKE_NONCOPYABLE 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 | « Source/core/paint/RoundedInnerRectClipper.cpp ('k') | Source/core/paint/SVGMaskPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGClipPainter.cpp
diff --git a/Source/core/paint/SVGClipPainter.cpp b/Source/core/paint/SVGClipPainter.cpp
index 4d49205577d979988048f3af89f665e6d7e61980..410153c8aa63076998804d8ec01f4e90b3bf5b2a 100644
--- a/Source/core/paint/SVGClipPainter.cpp
+++ b/Source/core/paint/SVGClipPainter.cpp
@@ -97,17 +97,18 @@ bool SVGClipPainter::applyClippingToContext(const LayoutObject& target, const Fl
void SVGClipPainter::postApplyStatefulResource(const LayoutObject& target, GraphicsContext* context, ClipperState& clipperState)
{
switch (clipperState) {
- case ClipperAppliedPath:
+ case ClipperAppliedPath: {
// Path-only clipping, no layers to restore but we need to emit an end to the clip path display item.
+ EndClipPathDisplayItem endClipPathDisplayItem(target);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
if (context->displayItemList()->displayItemConstructionIsDisabled())
return;
- context->displayItemList()->add(EndClipPathDisplayItem::create(target));
+ context->displayItemList()->add(endClipPathDisplayItem);
} else {
- EndClipPathDisplayItem endClipPathDisplayItem(target);
endClipPathDisplayItem.replay(*context);
}
break;
+ }
case ClipperAppliedMask:
// Transfer content -> clip mask (SrcIn)
CompositingRecorder::endCompositing(*context, target);
@@ -128,13 +129,13 @@ void SVGClipPainter::drawClipMaskContent(GraphicsContext* context, const LayoutO
RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(contentTransformation, targetBoundingBox, context);
TransformRecorder recorder(*context, layoutObject, contentTransformation);
+ DrawingDisplayItem clipPicture(layoutObject, DisplayItem::SVGClip, clipContentPicture);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(context->displayItemList());
if (context->displayItemList()->displayItemConstructionIsDisabled())
return;
- context->displayItemList()->add(DrawingDisplayItem::create(layoutObject, DisplayItem::SVGClip, clipContentPicture));
+ context->displayItemList()->add(clipPicture);
} else {
- DrawingDisplayItem clipPicture(layoutObject, DisplayItem::SVGClip, clipContentPicture);
clipPicture.replay(*context);
}
}
« no previous file with comments | « Source/core/paint/RoundedInnerRectClipper.cpp ('k') | Source/core/paint/SVGMaskPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698