Index: Source/platform/graphics/paint/DrawingRecorder.cpp |
diff --git a/Source/platform/graphics/paint/DrawingRecorder.cpp b/Source/platform/graphics/paint/DrawingRecorder.cpp |
index 34b43b3b99dd704803043d5ba30baaffd5a1f975..ba6c1374551c349e6e3ee80f2d5b2a31e5713ef0 100644 |
--- a/Source/platform/graphics/paint/DrawingRecorder.cpp |
+++ b/Source/platform/graphics/paint/DrawingRecorder.cpp |
@@ -91,13 +91,14 @@ DrawingRecorder::~DrawingRecorder() |
m_displayItemClient.debugName().utf8().data()); |
} |
#endif |
- m_context.displayItemList()->add(CachedDisplayItem::create(m_displayItemClient, DisplayItem::drawingTypeToCachedType(m_displayItemType))); |
+ CachedDisplayItem cachedDisplayItem(m_displayItemClient, DisplayItem::drawingTypeToCachedType(m_displayItemType)); |
+ m_context.displayItemList()->add(cachedDisplayItem); |
} else { |
- OwnPtr<DrawingDisplayItem> drawingDisplayItem = DrawingDisplayItem::create(m_displayItemClient, m_displayItemType, m_context.endRecording()); |
+ DrawingDisplayItem drawingDisplayItem(m_displayItemClient, m_displayItemType, m_context.endRecording()); |
#if ENABLE(ASSERT) |
- drawingDisplayItem->setUnderInvalidationCheckingMode(m_underInvalidationCheckingMode); |
+ drawingDisplayItem.setUnderInvalidationCheckingMode(m_underInvalidationCheckingMode); |
#endif |
- m_context.displayItemList()->add(drawingDisplayItem.release()); |
+ m_context.displayItemList()->add(drawingDisplayItem); |
} |
} |