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

Unified Diff: Source/platform/graphics/paint/DrawingRecorder.cpp

Issue 1193433004: Blink-side contiguous allocation of display items. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Ready for review 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
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..44b81310985d83a8a5bb7dc2b5aac9e97a364b08 100644
--- a/Source/platform/graphics/paint/DrawingRecorder.cpp
+++ b/Source/platform/graphics/paint/DrawingRecorder.cpp
@@ -91,13 +91,13 @@ DrawingRecorder::~DrawingRecorder()
m_displayItemClient.debugName().utf8().data());
}
#endif
- m_context.displayItemList()->add(CachedDisplayItem::create(m_displayItemClient, DisplayItem::drawingTypeToCachedType(m_displayItemType)));
+ m_context.displayItemList()->createAndAppendIfNeeded<CachedDisplayItem>(m_displayItemClient, DisplayItem::drawingTypeToCachedType(m_displayItemType));
} else {
- OwnPtr<DrawingDisplayItem> drawingDisplayItem = DrawingDisplayItem::create(m_displayItemClient, m_displayItemType, m_context.endRecording());
#if ENABLE(ASSERT)
- drawingDisplayItem->setUnderInvalidationCheckingMode(m_underInvalidationCheckingMode);
+ m_context.displayItemList()->createAndAppendIfNeeded<DrawingDisplayItem>(m_displayItemClient, m_displayItemType, m_context.endRecording(), m_underInvalidationCheckingMode);
+#else
+ m_context.displayItemList()->createAndAppendIfNeeded<DrawingDisplayItem>(m_displayItemClient, m_displayItemType, m_context.endRecording());
#endif
- m_context.displayItemList()->add(drawingDisplayItem.release());
}
}

Powered by Google App Engine
This is Rietveld 408576698