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

Unified Diff: Source/platform/graphics/paint/ClipRecorder.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
Index: Source/platform/graphics/paint/ClipRecorder.cpp
diff --git a/Source/platform/graphics/paint/ClipRecorder.cpp b/Source/platform/graphics/paint/ClipRecorder.cpp
index 89471735da5e17201d0753c382e0102209552f18..407fc4c386dc477fd0ce148ebf55e5a7ec6032e6 100644
--- a/Source/platform/graphics/paint/ClipRecorder.cpp
+++ b/Source/platform/graphics/paint/ClipRecorder.cpp
@@ -17,13 +17,13 @@ ClipRecorder::ClipRecorder(GraphicsContext& context, const DisplayItemClientWrap
, m_context(context)
, m_type(type)
{
+ ClipDisplayItem clipDisplayItem(m_client, type, pixelSnappedIntRect(clipRect), operation);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(m_context.displayItemList());
if (m_context.displayItemList()->displayItemConstructionIsDisabled())
return;
- m_context.displayItemList()->add(ClipDisplayItem::create(m_client, type, pixelSnappedIntRect(clipRect), operation));
+ m_context.displayItemList()->add(clipDisplayItem);
} else {
- ClipDisplayItem clipDisplayItem(m_client, type, pixelSnappedIntRect(clipRect), operation);
clipDisplayItem.replay(m_context);
}
}
@@ -31,13 +31,13 @@ ClipRecorder::ClipRecorder(GraphicsContext& context, const DisplayItemClientWrap
ClipRecorder::~ClipRecorder()
{
DisplayItem::Type endType = DisplayItem::clipTypeToEndClipType(m_type);
+ EndClipDisplayItem endClipDisplayItem(m_client, endType);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(m_context.displayItemList());
if (m_context.displayItemList()->displayItemConstructionIsDisabled())
return;
- m_context.displayItemList()->add(EndClipDisplayItem::create(m_client, endType));
+ m_context.displayItemList()->add(endClipDisplayItem);
} else {
- EndClipDisplayItem endClipDisplayItem(m_client, endType);
endClipDisplayItem.replay(m_context);
}
}
« no previous file with comments | « Source/platform/graphics/paint/ClipPathRecorder.cpp ('k') | Source/platform/graphics/paint/CompositingDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698