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

Unified Diff: Source/core/paint/ScrollRecorder.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/core/paint/ScrollRecorder.cpp
diff --git a/Source/core/paint/ScrollRecorder.cpp b/Source/core/paint/ScrollRecorder.cpp
index bbc320b683e32d46d749edacfadbc2ce4a72fa05..207f9f0dde562b2553ba1ed63fb0da4a6fa01f1d 100644
--- a/Source/core/paint/ScrollRecorder.cpp
+++ b/Source/core/paint/ScrollRecorder.cpp
@@ -21,7 +21,7 @@ ScrollRecorder::ScrollRecorder(GraphicsContext& context, const DisplayItemClient
ASSERT(m_context.displayItemList());
if (m_context.displayItemList()->displayItemConstructionIsDisabled())
return;
- m_context.displayItemList()->add(BeginScrollDisplayItem::create(m_client, m_beginItemType, currentOffset));
+ m_context.displayItemList()->createAndAppendIfNeeded<BeginScrollDisplayItem>(m_client, m_beginItemType, currentOffset);
} else {
BeginScrollDisplayItem scrollDisplayItem(m_client, m_beginItemType, currentOffset);
scrollDisplayItem.replay(m_context);
@@ -35,7 +35,7 @@ ScrollRecorder::~ScrollRecorder()
ASSERT(m_context.displayItemList());
if (m_context.displayItemList()->displayItemConstructionIsDisabled())
return;
- m_context.displayItemList()->add(EndScrollDisplayItem::create(m_client, endItemType));
+ m_context.displayItemList()->createAndAppendIfNeeded<EndScrollDisplayItem>(m_client, endItemType);
} else {
EndScrollDisplayItem endScrollDisplayItem(m_client, endItemType);
endScrollDisplayItem.replay(m_context);

Powered by Google App Engine
This is Rietveld 408576698