| 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. |
| 11 void* pointer; | 11 void* pointer; |
| 12 int ints[2]; // Make sure other fields are packed into two ints. | 12 int i; |
| 13 #ifndef NDEBUG | 13 #ifndef NDEBUG |
| 14 WTF::String m_debugString; | 14 WTF::String m_debugString; |
| 15 #endif | 15 #endif |
| 16 }; | 16 }; |
| 17 static_assert(sizeof(DisplayItem) == sizeof(SameSizeAsDisplayItem), "DisplayItem
should stay small"); | 17 static_assert(sizeof(DisplayItem) == sizeof(SameSizeAsDisplayItem), "DisplayItem
should stay small"); |
| 18 | 18 |
| 19 #ifndef NDEBUG | 19 #ifndef NDEBUG |
| 20 | 20 |
| 21 static WTF::String paintPhaseAsDebugString(int paintPhase) | 21 static WTF::String paintPhaseAsDebugString(int paintPhase) |
| 22 { | 22 { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 stringBuilder.append(String::format("client: \"%p", &client())); | 244 stringBuilder.append(String::format("client: \"%p", &client())); |
| 245 if (!clientDebugString().isEmpty()) { | 245 if (!clientDebugString().isEmpty()) { |
| 246 stringBuilder.append(' '); | 246 stringBuilder.append(' '); |
| 247 stringBuilder.append(clientDebugString()); | 247 stringBuilder.append(clientDebugString()); |
| 248 } | 248 } |
| 249 stringBuilder.append("\", type: \""); | 249 stringBuilder.append("\", type: \""); |
| 250 stringBuilder.append(typeAsDebugString(getType())); | 250 stringBuilder.append(typeAsDebugString(getType())); |
| 251 stringBuilder.append('"'); | 251 stringBuilder.append('"'); |
| 252 if (m_skippedCache) | 252 if (m_skippedCache) |
| 253 stringBuilder.append(", skippedCache: true"); | 253 stringBuilder.append(", skippedCache: true"); |
| 254 if (m_scope) | |
| 255 stringBuilder.append(String::format(", scope: %d", m_scope)); | |
| 256 } | 254 } |
| 257 | 255 |
| 258 #endif | 256 #endif |
| 259 | 257 |
| 260 } // namespace blink | 258 } // namespace blink |
| OLD | NEW |