| OLD | NEW |
| 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 "platform/graphics/paint/DisplayItem.h" | 5 #include "platform/graphics/paint/DisplayItem.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 struct SameSizeAsDisplayItem { | 9 struct SameSizeAsDisplayItem { |
| 10 virtual ~SameSizeAsDisplayItem() { } // Allocate vtable pointer. | 10 virtual ~SameSizeAsDisplayItem() { } // Allocate vtable pointer. |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 switch (type) { | 178 switch (type) { |
| 179 DEBUG_STRING_CASE(Transform3DElementTransform); | 179 DEBUG_STRING_CASE(Transform3DElementTransform); |
| 180 DEFAULT_CASE; | 180 DEFAULT_CASE; |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 | 183 |
| 184 WTF::String DisplayItem::typeAsDebugString(Type type) | 184 WTF::String DisplayItem::typeAsDebugString(Type type) |
| 185 { | 185 { |
| 186 if (isDrawingType(type)) | 186 if (isDrawingType(type)) |
| 187 return drawingTypeAsDebugString(type); | 187 return drawingTypeAsDebugString(type); |
| 188 if (isCachedDrawingType(type)) | |
| 189 return "Cached" + drawingTypeAsDebugString(cachedDrawingTypeToDrawingTyp
e(type)); | |
| 190 | 188 |
| 191 if (isForeignLayerType(type)) | 189 if (isForeignLayerType(type)) |
| 192 return foreignLayerTypeAsDebugString(type); | 190 return foreignLayerTypeAsDebugString(type); |
| 193 | 191 |
| 194 if (isClipType(type)) | 192 if (isClipType(type)) |
| 195 return clipTypeAsDebugString(type); | 193 return clipTypeAsDebugString(type); |
| 196 if (isEndClipType(type)) | 194 if (isEndClipType(type)) |
| 197 return "End" + clipTypeAsDebugString(endClipTypeToClipType(type)); | 195 return "End" + clipTypeAsDebugString(endClipTypeToClipType(type)); |
| 198 | 196 |
| 199 if (type == UninitializedType) | 197 if (type == UninitializedType) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 217 DEBUG_STRING_CASE(BeginFilter); | 215 DEBUG_STRING_CASE(BeginFilter); |
| 218 DEBUG_STRING_CASE(EndFilter); | 216 DEBUG_STRING_CASE(EndFilter); |
| 219 DEBUG_STRING_CASE(BeginCompositing); | 217 DEBUG_STRING_CASE(BeginCompositing); |
| 220 DEBUG_STRING_CASE(EndCompositing); | 218 DEBUG_STRING_CASE(EndCompositing); |
| 221 DEBUG_STRING_CASE(BeginTransform); | 219 DEBUG_STRING_CASE(BeginTransform); |
| 222 DEBUG_STRING_CASE(EndTransform); | 220 DEBUG_STRING_CASE(EndTransform); |
| 223 DEBUG_STRING_CASE(BeginClipPath); | 221 DEBUG_STRING_CASE(BeginClipPath); |
| 224 DEBUG_STRING_CASE(EndClipPath); | 222 DEBUG_STRING_CASE(EndClipPath); |
| 225 DEBUG_STRING_CASE(Subsequence); | 223 DEBUG_STRING_CASE(Subsequence); |
| 226 DEBUG_STRING_CASE(EndSubsequence); | 224 DEBUG_STRING_CASE(EndSubsequence); |
| 227 DEBUG_STRING_CASE(CachedSubsequence); | |
| 228 DEBUG_STRING_CASE(UninitializedType); | 225 DEBUG_STRING_CASE(UninitializedType); |
| 229 DEFAULT_CASE; | 226 DEFAULT_CASE; |
| 230 } | 227 } |
| 231 } | 228 } |
| 232 | 229 |
| 233 WTF::String DisplayItem::asDebugString() const | 230 WTF::String DisplayItem::asDebugString() const |
| 234 { | 231 { |
| 235 WTF::StringBuilder stringBuilder; | 232 WTF::StringBuilder stringBuilder; |
| 236 stringBuilder.append('{'); | 233 stringBuilder.append('{'); |
| 237 dumpPropertiesAsDebugString(stringBuilder); | 234 dumpPropertiesAsDebugString(stringBuilder); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 256 stringBuilder.append("\", type: \""); | 253 stringBuilder.append("\", type: \""); |
| 257 stringBuilder.append(typeAsDebugString(getType())); | 254 stringBuilder.append(typeAsDebugString(getType())); |
| 258 stringBuilder.append('"'); | 255 stringBuilder.append('"'); |
| 259 if (m_skippedCache) | 256 if (m_skippedCache) |
| 260 stringBuilder.append(", skippedCache: true"); | 257 stringBuilder.append(", skippedCache: true"); |
| 261 } | 258 } |
| 262 | 259 |
| 263 #endif | 260 #endif |
| 264 | 261 |
| 265 } // namespace blink | 262 } // namespace blink |
| OLD | NEW |