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

Side by Side Diff: Source/platform/graphics/paint/DisplayItem.cpp

Issue 1306433002: Let collapsed border drawings be cacheable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "platform/graphics/paint/DisplayItem.h" 6 #include "platform/graphics/paint/DisplayItem.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 struct SameSizeAsDisplayItem { 10 struct SameSizeAsDisplayItem {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 if (type >= DisplayItem::Category##PaintPhaseFirst && type <= DisplayItem::C ategory##PaintPhaseLast) \ 46 if (type >= DisplayItem::Category##PaintPhaseFirst && type <= DisplayItem::C ategory##PaintPhaseLast) \
47 return #Category + paintPhaseAsDebugString(type - DisplayItem::Category# #PaintPhaseFirst); 47 return #Category + paintPhaseAsDebugString(type - DisplayItem::Category# #PaintPhaseFirst);
48 48
49 #define DEBUG_STRING_CASE(DisplayItemName) \ 49 #define DEBUG_STRING_CASE(DisplayItemName) \
50 case DisplayItem::DisplayItemName: return #DisplayItemName 50 case DisplayItem::DisplayItemName: return #DisplayItemName
51 51
52 #define DEFAULT_CASE default: ASSERT_NOT_REACHED(); return "Unknown" 52 #define DEFAULT_CASE default: ASSERT_NOT_REACHED(); return "Unknown"
53 53
54 static WTF::String specialDrawingTypeAsDebugString(DisplayItem::Type type) 54 static WTF::String specialDrawingTypeAsDebugString(DisplayItem::Type type)
55 { 55 {
56 if (type >= DisplayItem::TableCollapsedBorderUnalignedBase) {
57 if (type <= DisplayItem::TableCollapsedBorderBase)
58 return "TableCollapsedBorderAlignment";
59 if (type <= DisplayItem::TableCollapsedBorderLast) {
60 StringBuilder sb;
61 sb.append("TableCollapsedBorder");
62 if (type & DisplayItem::TableCollapsedBorderTop)
63 sb.append("Top");
64 if (type & DisplayItem::TableCollapsedBorderRight)
65 sb.append("Right");
66 if (type & DisplayItem::TableCollapsedBorderBottom)
67 sb.append("Bottom");
68 if (type & DisplayItem::TableCollapsedBorderLeft)
69 sb.append("Left");
70 return sb.toString();
71 }
72 }
56 switch (type) { 73 switch (type) {
57 DEBUG_STRING_CASE(BoxDecorationBackground); 74 DEBUG_STRING_CASE(BoxDecorationBackground);
58 DEBUG_STRING_CASE(Caret); 75 DEBUG_STRING_CASE(Caret);
59 DEBUG_STRING_CASE(ColumnRules); 76 DEBUG_STRING_CASE(ColumnRules);
60 DEBUG_STRING_CASE(DebugRedFill); 77 DEBUG_STRING_CASE(DebugRedFill);
61 DEBUG_STRING_CASE(DragImage); 78 DEBUG_STRING_CASE(DragImage);
62 DEBUG_STRING_CASE(SVGImage); 79 DEBUG_STRING_CASE(SVGImage);
63 DEBUG_STRING_CASE(LinkHighlight); 80 DEBUG_STRING_CASE(LinkHighlight);
64 DEBUG_STRING_CASE(PageOverlay); 81 DEBUG_STRING_CASE(PageOverlay);
65 DEBUG_STRING_CASE(PageWidgetDelegateBackgroundFallback); 82 DEBUG_STRING_CASE(PageWidgetDelegateBackgroundFallback);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 stringBuilder.append('"'); 229 stringBuilder.append('"');
213 if (m_skippedCache) 230 if (m_skippedCache)
214 stringBuilder.append(", skippedCache: true"); 231 stringBuilder.append(", skippedCache: true");
215 if (m_scope) 232 if (m_scope)
216 stringBuilder.append(String::format(", scope: %d", m_scope)); 233 stringBuilder.append(String::format(", scope: %d", m_scope));
217 } 234 }
218 235
219 #endif 236 #endif
220 237
221 } // namespace blink 238 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698