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

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

Issue 1193433004: Blink-side contiguous allocation of display items. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ListContainer::AllocateAndConstructWithArguments and a TODO in DisplayItemList::findMatchingIte… 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 32f4f9ccf14647fa7cdda1d964baca0e9d393e3d..b1e665501f9b931405d65286b7ff178c7da7cf03 100644
--- a/Source/core/paint/BoxClipper.cpp
+++ b/Source/core/paint/BoxClipper.cpp
@@ -59,8 +59,7 @@ BoxClipper::BoxClipper(const LayoutBox& box, const PaintInfo& paintInfo, const L
roundedRects = adoptPtr(new Vector<FloatRoundedRect>());
roundedRects->append(clipRoundedRect);
}
- OwnPtr<ClipDisplayItem> clipDisplayItem = ClipDisplayItem::create(m_box, m_clipType, pixelSnappedIntRect(clipRect), roundedRects.release());
- m_paintInfo.context->displayItemList()->add(clipDisplayItem.release());
+ m_paintInfo.context->displayItemList()->createAndAppend<ClipDisplayItem>(m_box, m_clipType, pixelSnappedIntRect(clipRect), roundedRects.release());
}
} else {
m_clipType = m_paintInfo.displayItemTypeForClipping();
@@ -69,8 +68,8 @@ BoxClipper::BoxClipper(const LayoutBox& box, const PaintInfo& paintInfo, const L
roundedRects = adoptPtr(new Vector<FloatRoundedRect>());
roundedRects->append(clipRoundedRect);
}
- OwnPtr<ClipDisplayItem> clipDisplayItem = ClipDisplayItem::create(m_box, m_clipType, pixelSnappedIntRect(clipRect), roundedRects.release());
- clipDisplayItem->replay(*paintInfo.context);
+ ClipDisplayItem clipDisplayItem(m_box, m_clipType, pixelSnappedIntRect(clipRect), roundedRects.release());
+ clipDisplayItem.replay(*paintInfo.context);
}
}
@@ -87,7 +86,7 @@ BoxClipper::~BoxClipper()
if (m_paintInfo.context->displayItemList()->lastDisplayItemIsNoopBegin())
m_paintInfo.context->displayItemList()->removeLastDisplayItem();
else
- m_paintInfo.context->displayItemList()->add(EndClipDisplayItem::create(m_box, DisplayItem::clipTypeToEndClipType(m_clipType)));
+ m_paintInfo.context->displayItemList()->createAndAppend<EndClipDisplayItem>(m_box, DisplayItem::clipTypeToEndClipType(m_clipType));
}
} else {
EndClipDisplayItem endClipDisplayItem(m_box, DisplayItem::clipTypeToEndClipType(m_clipType));
« 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