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

Unified Diff: Source/core/paint/SVGMaskPainter.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/SVGClipPainter.cpp ('k') | Source/core/paint/ScrollRecorder.cpp » ('j') | 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 6b4e4d75005268129d93c8fc9bfa42f28e369e53..d6bb8ecd7e8406b18929fda83d7b084288318535 100644
--- a/Source/core/paint/SVGMaskPainter.cpp
+++ b/Source/core/paint/SVGMaskPainter.cpp
@@ -28,13 +28,13 @@ bool SVGMaskPainter::prepareEffect(const LayoutObject& object, GraphicsContext*
if (paintInvalidationRect.isEmpty() || !m_mask.element()->hasChildren())
return false;
+ BeginCompositingDisplayItem beginCompositingContent(object, SkXfermode::kSrcOver_Mode, 1, &paintInvalidationRect);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(context->displayItemList());
if (context->displayItemList()->displayItemConstructionIsDisabled())
return true;
- context->displayItemList()->add(BeginCompositingDisplayItem::create(object, SkXfermode::kSrcOver_Mode, 1, &paintInvalidationRect));
+ context->displayItemList()->add(beginCompositingContent);
} else {
- BeginCompositingDisplayItem beginCompositingContent(object, SkXfermode::kSrcOver_Mode, 1, &paintInvalidationRect);
beginCompositingContent.replay(*context);
}
@@ -55,13 +55,13 @@ void SVGMaskPainter::finishEffect(const LayoutObject& object, GraphicsContext* c
drawMaskForLayoutObject(context, object, object.objectBoundingBox());
}
+ EndCompositingDisplayItem endCompositingContent(object);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(context->displayItemList());
if (context->displayItemList()->displayItemConstructionIsDisabled())
return;
- context->displayItemList()->add(EndCompositingDisplayItem::create(object));
+ context->displayItemList()->add(endCompositingContent);
} else {
- EndCompositingDisplayItem endCompositingContent(object);
endCompositingContent.replay(*context);
}
}
@@ -73,14 +73,14 @@ void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay
AffineTransform contentTransformation;
RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(contentTransformation, targetBoundingBox, context);
+ DrawingDisplayItem maskPicture(layoutObject, DisplayItem::SVGMask, maskContentPicture);
TransformRecorder recorder(*context, layoutObject, contentTransformation);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(context->displayItemList());
if (context->displayItemList()->displayItemConstructionIsDisabled())
return;
- context->displayItemList()->add(DrawingDisplayItem::create(layoutObject, DisplayItem::SVGMask, maskContentPicture));
+ context->displayItemList()->add(maskPicture);
} else {
- DrawingDisplayItem maskPicture(layoutObject, DisplayItem::SVGClip, maskContentPicture);
maskPicture.replay(*context);
}
}
« no previous file with comments | « Source/core/paint/SVGClipPainter.cpp ('k') | Source/core/paint/ScrollRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698