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

Unified Diff: Source/core/paint/RoundedInnerRectClipper.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/paint/LayoutObjectDrawingRecorderTest.cpp ('k') | Source/core/paint/SVGClipPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/RoundedInnerRectClipper.cpp
diff --git a/Source/core/paint/RoundedInnerRectClipper.cpp b/Source/core/paint/RoundedInnerRectClipper.cpp
index 3e0bfa03243402bd49ec8c221604a09af9ad0dda..79c27a63d3ffc2e483d1bba3ff2b6ccccc185efa 100644
--- a/Source/core/paint/RoundedInnerRectClipper.cpp
+++ b/Source/core/paint/RoundedInnerRectClipper.cpp
@@ -48,14 +48,14 @@ RoundedInnerRectClipper::RoundedInnerRectClipper(LayoutObject& layoutObject, con
}
}
- OwnPtr<ClipDisplayItem> clipDisplayItem = ClipDisplayItem::create(layoutObject, m_clipType, LayoutRect::infiniteIntRect(), roundedRectClips.release());
if (m_useDisplayItemList) {
ASSERT(m_paintInfo.context->displayItemList());
if (m_paintInfo.context->displayItemList()->displayItemConstructionIsDisabled())
return;
- m_paintInfo.context->displayItemList()->add(clipDisplayItem.release());
+ m_paintInfo.context->displayItemList()->createAndAppend<ClipDisplayItem>(layoutObject, m_clipType, LayoutRect::infiniteIntRect(), roundedRectClips.release());
} else {
- clipDisplayItem->replay(*paintInfo.context);
+ ClipDisplayItem clipDisplayItem(layoutObject, m_clipType, LayoutRect::infiniteIntRect(), roundedRectClips.release());
+ clipDisplayItem.replay(*paintInfo.context);
}
}
@@ -68,7 +68,7 @@ RoundedInnerRectClipper::~RoundedInnerRectClipper()
if (m_paintInfo.context->displayItemList()->lastDisplayItemIsNoopBegin())
m_paintInfo.context->displayItemList()->removeLastDisplayItem();
else
- m_paintInfo.context->displayItemList()->add(EndClipDisplayItem::create(m_layoutObject, endType));
+ m_paintInfo.context->displayItemList()->createAndAppend<EndClipDisplayItem>(m_layoutObject, endType);
}
} else {
EndClipDisplayItem endClipDisplayItem(m_layoutObject, endType);
« no previous file with comments | « Source/core/paint/LayoutObjectDrawingRecorderTest.cpp ('k') | Source/core/paint/SVGClipPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698