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

Unified Diff: Source/core/paint/ScrollRecorder.cpp

Issue 1192443003: [Slimming Paint] Blink-side contiguous allocation of display items. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: need a constructor with WTF_MAKE_NONCOPYABLE 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/SVGMaskPainter.cpp ('k') | Source/core/paint/SubtreeRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/ScrollRecorder.cpp
diff --git a/Source/core/paint/ScrollRecorder.cpp b/Source/core/paint/ScrollRecorder.cpp
index bbc320b683e32d46d749edacfadbc2ce4a72fa05..dafae0de4a82d61165114b72debef118887544a1 100644
--- a/Source/core/paint/ScrollRecorder.cpp
+++ b/Source/core/paint/ScrollRecorder.cpp
@@ -17,13 +17,13 @@ ScrollRecorder::ScrollRecorder(GraphicsContext& context, const DisplayItemClient
, m_beginItemType(DisplayItem::paintPhaseToScrollType(phase))
, m_context(context)
{
+ BeginScrollDisplayItem scrollDisplayItem(m_client, m_beginItemType, currentOffset);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(m_context.displayItemList());
if (m_context.displayItemList()->displayItemConstructionIsDisabled())
return;
- m_context.displayItemList()->add(BeginScrollDisplayItem::create(m_client, m_beginItemType, currentOffset));
+ m_context.displayItemList()->add(scrollDisplayItem);
} else {
- BeginScrollDisplayItem scrollDisplayItem(m_client, m_beginItemType, currentOffset);
scrollDisplayItem.replay(m_context);
}
}
@@ -31,13 +31,13 @@ ScrollRecorder::ScrollRecorder(GraphicsContext& context, const DisplayItemClient
ScrollRecorder::~ScrollRecorder()
{
DisplayItem::Type endItemType = DisplayItem::scrollTypeToEndScrollType(m_beginItemType);
+ EndScrollDisplayItem endScrollDisplayItem(m_client, endItemType);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(m_context.displayItemList());
if (m_context.displayItemList()->displayItemConstructionIsDisabled())
return;
- m_context.displayItemList()->add(EndScrollDisplayItem::create(m_client, endItemType));
+ m_context.displayItemList()->add(endScrollDisplayItem);
} else {
- EndScrollDisplayItem endScrollDisplayItem(m_client, endItemType);
endScrollDisplayItem.replay(m_context);
}
}
« no previous file with comments | « Source/core/paint/SVGMaskPainter.cpp ('k') | Source/core/paint/SubtreeRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698