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

Unified Diff: Source/core/paint/BoxClipper.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/layout/svg/LayoutSVGResourceClipper.cpp ('k') | Source/core/paint/CompositingRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxClipper.cpp
diff --git a/Source/core/paint/BoxClipper.cpp b/Source/core/paint/BoxClipper.cpp
index ce1de5652c9232df953bec572020b00fd471b139..28bc41222d34058a6f607677d24e23ad83fece89 100644
--- a/Source/core/paint/BoxClipper.cpp
+++ b/Source/core/paint/BoxClipper.cpp
@@ -55,16 +55,16 @@ BoxClipper::BoxClipper(LayoutBox& box, const PaintInfo& paintInfo, const LayoutP
if (RuntimeEnabledFeatures::slimmingPaintEnabled())
m_clipType = m_paintInfo.displayItemTypeForClipping();
- OwnPtr<ClipDisplayItem> clipDisplayItem = ClipDisplayItem::create(m_box, m_clipType, pixelSnappedIntRect(clipRect));
+ ClipDisplayItem clipDisplayItem(m_box, m_clipType, pixelSnappedIntRect(clipRect));
if (hasBorderRadius)
- clipDisplayItem->roundedRectClips().append(clipRoundedRect);
+ clipDisplayItem.roundedRectClips().append(clipRoundedRect);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(m_paintInfo.context->displayItemList());
if (!m_paintInfo.context->displayItemList()->displayItemConstructionIsDisabled())
- m_paintInfo.context->displayItemList()->add(clipDisplayItem.release());
+ m_paintInfo.context->displayItemList()->add(clipDisplayItem);
} else {
- clipDisplayItem->replay(*paintInfo.context);
+ clipDisplayItem.replay(*paintInfo.context);
}
m_pushedClip = true;
@@ -78,14 +78,13 @@ BoxClipper::~BoxClipper()
ASSERT(m_box.hasControlClip() || (m_box.hasOverflowClip() && !m_box.layer()->isSelfPaintingLayer()));
DisplayItem::Type endType = DisplayItem::clipTypeToEndClipType(m_clipType);
+ EndClipDisplayItem endClipDisplayItem(m_box, endType);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
if (m_paintInfo.context->displayItemList()->displayItemConstructionIsDisabled())
return;
- OwnPtr<EndClipDisplayItem> endClipDisplayItem = EndClipDisplayItem::create(m_box, endType);
ASSERT(m_paintInfo.context->displayItemList());
- m_paintInfo.context->displayItemList()->add(endClipDisplayItem.release());
+ m_paintInfo.context->displayItemList()->add(endClipDisplayItem);
} else {
- EndClipDisplayItem endClipDisplayItem(m_box, endType);
endClipDisplayItem.replay(*m_paintInfo.context);
}
}
« no previous file with comments | « Source/core/layout/svg/LayoutSVGResourceClipper.cpp ('k') | Source/core/paint/CompositingRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698