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

Unified Diff: Source/platform/graphics/paint/ClipDisplayItem.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/ClipDisplayItem.cpp
diff --git a/Source/platform/graphics/paint/ClipDisplayItem.cpp b/Source/platform/graphics/paint/ClipDisplayItem.cpp
index 26eb7900ec54c0b23c77b90f5e579c9607c4df57..fbd7d35e526a6b6753a2da987bec4e2dec6b8310 100644
--- a/Source/platform/graphics/paint/ClipDisplayItem.cpp
+++ b/Source/platform/graphics/paint/ClipDisplayItem.cpp
@@ -7,6 +7,7 @@
#include "platform/geometry/FloatRoundedRect.h"
#include "platform/graphics/GraphicsContext.h"
+#include "platform/graphics/paint/DisplayItems.h"
#include "public/platform/WebDisplayItemList.h"
#include "third_party/skia/include/core/SkScalar.h"
@@ -42,6 +43,14 @@ void ClipDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* list) const
list->appendClipItem(m_clipRect, webRoundedRects);
}
+void ClipDisplayItem::appendByMoving(DisplayItems& destination)
+{
+ ClipDisplayItem& displayItem = destination.emplaceBack<ClipDisplayItem>(
+ DisplayItemClientWrapperHelper(*this),
+ type(), m_clipRect, m_operation);
+ displayItem.roundedRectClips().swap(roundedRectClips());
+}
+
void EndClipDisplayItem::replay(GraphicsContext& context)
{
context.restore();
@@ -52,6 +61,12 @@ void EndClipDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* list) co
list->appendEndClipItem();
}
+void EndClipDisplayItem::appendByMoving(DisplayItems& destination)
+{
+ destination.emplaceBack<EndClipDisplayItem>(
+ DisplayItemClientWrapperHelper(*this), type());
+}
+
#ifndef NDEBUG
void ClipDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const
{
« no previous file with comments | « Source/platform/graphics/paint/ClipDisplayItem.h ('k') | Source/platform/graphics/paint/ClipPathDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698