Index: Source/platform/graphics/paint/ClipRecorder.cpp |
diff --git a/Source/platform/graphics/paint/ClipRecorder.cpp b/Source/platform/graphics/paint/ClipRecorder.cpp |
index 32803581cf4ddde650911d04912d4b4089e3f510..faf1e04fc1c363dcc0268e6c8a4e9daefff45ebb 100644 |
--- a/Source/platform/graphics/paint/ClipRecorder.cpp |
+++ b/Source/platform/graphics/paint/ClipRecorder.cpp |
@@ -21,7 +21,7 @@ ClipRecorder::ClipRecorder(GraphicsContext& context, const DisplayItemClientWrap |
ASSERT(m_context.displayItemList()); |
if (m_context.displayItemList()->displayItemConstructionIsDisabled()) |
return; |
- m_context.displayItemList()->add(ClipDisplayItem::create(m_client, type, pixelSnappedIntRect(clipRect))); |
+ m_context.displayItemList()->createAndAppend<ClipDisplayItem>(m_client, type, pixelSnappedIntRect(clipRect)); |
} else { |
ClipDisplayItem clipDisplayItem(m_client, type, pixelSnappedIntRect(clipRect)); |
clipDisplayItem.replay(m_context); |
@@ -30,17 +30,16 @@ ClipRecorder::ClipRecorder(GraphicsContext& context, const DisplayItemClientWrap |
ClipRecorder::~ClipRecorder() |
{ |
- DisplayItem::Type endType = DisplayItem::clipTypeToEndClipType(m_type); |
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
ASSERT(m_context.displayItemList()); |
if (!m_context.displayItemList()->displayItemConstructionIsDisabled()) { |
if (m_context.displayItemList()->lastDisplayItemIsNoopBegin()) |
m_context.displayItemList()->removeLastDisplayItem(); |
else |
- m_context.displayItemList()->add(EndClipDisplayItem::create(m_client, endType)); |
+ m_context.displayItemList()->createAndAppend<EndClipDisplayItem>(m_client, DisplayItem::clipTypeToEndClipType(m_type)); |
} |
} else { |
- EndClipDisplayItem endClipDisplayItem(m_client, endType); |
+ EndClipDisplayItem endClipDisplayItem(m_client, DisplayItem::clipTypeToEndClipType(m_type)); |
endClipDisplayItem.replay(m_context); |
} |
} |