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