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

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

Issue 702633002: Move ViewDisplayList to GraphicsLayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: copy & pasted test expectation from the wrong window. sorry. :( Created 6 years, 1 month 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/platform/graphics/paint/DisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/DisplayItem.cpp
diff --git a/Source/platform/graphics/paint/DisplayItem.cpp b/Source/platform/graphics/paint/DisplayItem.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..145341d7b5af41137f1108d25c49de188edfca2e
--- /dev/null
+++ b/Source/platform/graphics/paint/DisplayItem.cpp
@@ -0,0 +1,55 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "platform/graphics/paint/DisplayItem.h"
+
+namespace blink {
+
+#ifndef NDEBUG
+
+WTF::String DisplayItem::typeAsDebugString(DisplayItem::Type type)
+{
+ switch (type) {
+ case DisplayItem::DrawingPaintPhaseBlockBackground: return "DrawingPaintPhaseBlockBackground";
+ case DisplayItem::DrawingPaintPhaseChildBlockBackground: return "DrawingPaintPhaseChildBlockBackground";
+ case DisplayItem::DrawingPaintPhaseChildBlockBackgrounds: return "DrawingPaintPhaseChildBlockBackgrounds";
+ case DisplayItem::DrawingPaintPhaseFloat: return "DrawingPaintPhaseFloat";
+ case DisplayItem::DrawingPaintPhaseForeground: return "DrawingPaintPhaseForeground";
+ case DisplayItem::DrawingPaintPhaseOutline: return "DrawingPaintPhaseOutline";
+ case DisplayItem::DrawingPaintPhaseChildOutlines: return "DrawingPaintPhaseChildOutlines";
+ case DisplayItem::DrawingPaintPhaseSelfOutline: return "DrawingPaintPhaseSelfOutline";
+ case DisplayItem::DrawingPaintPhaseSelection: return "DrawingPaintPhaseSelection";
+ case DisplayItem::DrawingPaintPhaseCollapsedTableBorders: return "DrawingPaintPhaseCollapsedTableBorders";
+ case DisplayItem::DrawingPaintPhaseTextClip: return "DrawingPaintPhaseTextClip";
+ case DisplayItem::DrawingPaintPhaseMask: return "DrawingPaintPhaseMask";
+ case DisplayItem::DrawingPaintPhaseClippingMask: return "DrawingPaintPhaseClippingMask";
+ case DisplayItem::ClipLayerOverflowControls: return "ClipLayerOverflowControls";
+ case DisplayItem::ClipLayerBackground: return "ClipLayerBackground";
+ case DisplayItem::ClipLayerParent: return "ClipLayerParent";
+ case DisplayItem::ClipLayerFilter: return "ClipLayerFilter";
+ case DisplayItem::ClipLayerForeground: return "ClipLayerForeground";
+ case DisplayItem::ClipLayerFragmentFloat: return "ClipLayerFragmentFloat";
+ case DisplayItem::ClipLayerFragmentForeground: return "ClipLayerFragmentForeground";
+ case DisplayItem::ClipLayerFragmentChildOutline: return "ClipLayerFragmentChildOutline";
+ case DisplayItem::ClipLayerFragmentOutline: return "ClipLayerFragmentOutline";
+ case DisplayItem::ClipLayerFragmentMask: return "ClipLayerFragmentMask";
+ case DisplayItem::ClipLayerFragmentClippingMask: return "ClipLayerFragmentClippingMask";
+ case DisplayItem::ClipLayerFragmentParent: return "ClipLayerFragmentParent";
+ case DisplayItem::ClipLayerFragmentSelection: return "ClipLayerFragmentSelection";
+ case DisplayItem::ClipLayerFragmentChildBlockBackgrounds: return "ClipLayerFragmentChildBlockBackgrounds";
+ case DisplayItem::EndClip: return "EndClip";
+ }
+ ASSERT_NOT_REACHED();
+ return "Unknown";
+}
+
+WTF::String DisplayItem::asDebugString() const
+{
+ return String::format("{%s, type: \"%s\"}", clientDebugString().utf8().data(), typeAsDebugString(type()).utf8().data());
+}
+
+#endif
+
+} // namespace blink
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698