| 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 "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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 148 } |
| 149 | 149 |
| 150 static String transform3DTypeAsDebugString(DisplayItem::Type type) | 150 static String transform3DTypeAsDebugString(DisplayItem::Type type) |
| 151 { | 151 { |
| 152 switch (type) { | 152 switch (type) { |
| 153 DEBUG_STRING_CASE(Transform3DElementTransform); | 153 DEBUG_STRING_CASE(Transform3DElementTransform); |
| 154 DEFAULT_CASE; | 154 DEFAULT_CASE; |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 | 157 |
| 158 static String subsequenceTypeAsDebugString(DisplayItem::Type type) | |
| 159 { | |
| 160 switch (type) { | |
| 161 DEBUG_STRING_CASE(SubsequenceNegativeZOrder); | |
| 162 DEBUG_STRING_CASE(SubsequenceNormalFlowAndPositiveZOrder); | |
| 163 DEFAULT_CASE; | |
| 164 } | |
| 165 } | |
| 166 | |
| 167 WTF::String DisplayItem::typeAsDebugString(Type type) | 158 WTF::String DisplayItem::typeAsDebugString(Type type) |
| 168 { | 159 { |
| 169 if (isDrawingType(type)) | 160 if (isDrawingType(type)) |
| 170 return drawingTypeAsDebugString(type); | 161 return drawingTypeAsDebugString(type); |
| 171 if (isCachedDrawingType(type)) | 162 if (isCachedDrawingType(type)) |
| 172 return "Cached" + drawingTypeAsDebugString(cachedDrawingTypeToDrawingTyp
e(type)); | 163 return "Cached" + drawingTypeAsDebugString(cachedDrawingTypeToDrawingTyp
e(type)); |
| 173 if (isClipType(type)) | 164 if (isClipType(type)) |
| 174 return clipTypeAsDebugString(type); | 165 return clipTypeAsDebugString(type); |
| 175 if (isEndClipType(type)) | 166 if (isEndClipType(type)) |
| 176 return "End" + clipTypeAsDebugString(endClipTypeToClipType(type)); | 167 return "End" + clipTypeAsDebugString(endClipTypeToClipType(type)); |
| 177 | 168 |
| 178 if (type == UninitializedType) | 169 if (type == UninitializedType) |
| 179 return "UninitializedType"; | 170 return "UninitializedType"; |
| 180 | 171 |
| 181 PAINT_PHASE_BASED_DEBUG_STRINGS(FloatClip); | 172 PAINT_PHASE_BASED_DEBUG_STRINGS(FloatClip); |
| 182 if (isEndFloatClipType(type)) | 173 if (isEndFloatClipType(type)) |
| 183 return "End" + typeAsDebugString(endFloatClipTypeToFloatClipType(type)); | 174 return "End" + typeAsDebugString(endFloatClipTypeToFloatClipType(type)); |
| 184 | 175 |
| 185 PAINT_PHASE_BASED_DEBUG_STRINGS(Scroll); | 176 PAINT_PHASE_BASED_DEBUG_STRINGS(Scroll); |
| 186 if (isEndScrollType(type)) | 177 if (isEndScrollType(type)) |
| 187 return "End" + typeAsDebugString(endScrollTypeToScrollType(type)); | 178 return "End" + typeAsDebugString(endScrollTypeToScrollType(type)); |
| 188 | 179 |
| 189 if (isTransform3DType(type)) | 180 if (isTransform3DType(type)) |
| 190 return transform3DTypeAsDebugString(type); | 181 return transform3DTypeAsDebugString(type); |
| 191 if (isEndTransform3DType(type)) | 182 if (isEndTransform3DType(type)) |
| 192 return "End" + transform3DTypeAsDebugString(endTransform3DTypeToTransfor
m3DType(type)); | 183 return "End" + transform3DTypeAsDebugString(endTransform3DTypeToTransfor
m3DType(type)); |
| 193 | 184 |
| 194 if (isSubsequenceType(type)) | |
| 195 return subsequenceTypeAsDebugString(type); | |
| 196 if (isEndSubsequenceType(type)) | |
| 197 return "End" + subsequenceTypeAsDebugString(endSubsequenceTypeToSubseque
nceType(type)); | |
| 198 if (isCachedSubsequenceType(type)) | |
| 199 return "Cached" + subsequenceTypeAsDebugString(cachedSubsequenceTypeToSu
bsequenceType(type)); | |
| 200 | |
| 201 switch (type) { | 185 switch (type) { |
| 202 DEBUG_STRING_CASE(BeginFilter); | 186 DEBUG_STRING_CASE(BeginFilter); |
| 203 DEBUG_STRING_CASE(EndFilter); | 187 DEBUG_STRING_CASE(EndFilter); |
| 204 DEBUG_STRING_CASE(BeginCompositing); | 188 DEBUG_STRING_CASE(BeginCompositing); |
| 205 DEBUG_STRING_CASE(EndCompositing); | 189 DEBUG_STRING_CASE(EndCompositing); |
| 206 DEBUG_STRING_CASE(BeginTransform); | 190 DEBUG_STRING_CASE(BeginTransform); |
| 207 DEBUG_STRING_CASE(EndTransform); | 191 DEBUG_STRING_CASE(EndTransform); |
| 208 DEBUG_STRING_CASE(BeginClipPath); | 192 DEBUG_STRING_CASE(BeginClipPath); |
| 209 DEBUG_STRING_CASE(EndClipPath); | 193 DEBUG_STRING_CASE(EndClipPath); |
| 210 DEBUG_STRING_CASE(BeginFixedPosition); | 194 DEBUG_STRING_CASE(BeginFixedPosition); |
| 211 DEBUG_STRING_CASE(EndFixedPosition); | 195 DEBUG_STRING_CASE(EndFixedPosition); |
| 212 DEBUG_STRING_CASE(BeginFixedPositionContainer); | 196 DEBUG_STRING_CASE(BeginFixedPositionContainer); |
| 213 DEBUG_STRING_CASE(EndFixedPositionContainer); | 197 DEBUG_STRING_CASE(EndFixedPositionContainer); |
| 198 DEBUG_STRING_CASE(Subsequence); |
| 199 DEBUG_STRING_CASE(EndSubsequence); |
| 200 DEBUG_STRING_CASE(CachedSubsequence); |
| 214 DEBUG_STRING_CASE(CachedDisplayItemList); | 201 DEBUG_STRING_CASE(CachedDisplayItemList); |
| 215 DEBUG_STRING_CASE(UninitializedType); | 202 DEBUG_STRING_CASE(UninitializedType); |
| 216 DEFAULT_CASE; | 203 DEFAULT_CASE; |
| 217 } | 204 } |
| 218 } | 205 } |
| 219 | 206 |
| 220 WTF::String DisplayItem::asDebugString() const | 207 WTF::String DisplayItem::asDebugString() const |
| 221 { | 208 { |
| 222 WTF::StringBuilder stringBuilder; | 209 WTF::StringBuilder stringBuilder; |
| 223 stringBuilder.append('{'); | 210 stringBuilder.append('{'); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 245 stringBuilder.append('"'); | 232 stringBuilder.append('"'); |
| 246 if (m_skippedCache) | 233 if (m_skippedCache) |
| 247 stringBuilder.append(", skippedCache: true"); | 234 stringBuilder.append(", skippedCache: true"); |
| 248 if (m_scope) | 235 if (m_scope) |
| 249 stringBuilder.append(String::format(", scope: %d", m_scope)); | 236 stringBuilder.append(String::format(", scope: %d", m_scope)); |
| 250 } | 237 } |
| 251 | 238 |
| 252 #endif | 239 #endif |
| 253 | 240 |
| 254 } // namespace blink | 241 } // namespace blink |
| OLD | NEW |