| 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 LayoutRect rect; | |
| 13 int i; | 12 int i; |
| 14 #ifndef NDEBUG | 13 #ifndef NDEBUG |
| 15 WTF::String debug_string_; | 14 WTF::String debug_string_; |
| 16 #endif | 15 #endif |
| 17 }; | 16 }; |
| 18 static_assert(sizeof(DisplayItem) == sizeof(SameSizeAsDisplayItem), | 17 static_assert(sizeof(DisplayItem) == sizeof(SameSizeAsDisplayItem), |
| 19 "DisplayItem should stay small"); | 18 "DisplayItem should stay small"); |
| 20 | 19 |
| 21 #ifndef NDEBUG | 20 #ifndef NDEBUG |
| 22 | 21 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // This is the original debug string which is in json format. | 237 // This is the original debug string which is in json format. |
| 239 string_builder.Append(ClientDebugString()); | 238 string_builder.Append(ClientDebugString()); |
| 240 return; | 239 return; |
| 241 } | 240 } |
| 242 | 241 |
| 243 string_builder.Append(String::Format("client: \"%p", &Client())); | 242 string_builder.Append(String::Format("client: \"%p", &Client())); |
| 244 if (!ClientDebugString().IsEmpty()) { | 243 if (!ClientDebugString().IsEmpty()) { |
| 245 string_builder.Append(' '); | 244 string_builder.Append(' '); |
| 246 string_builder.Append(ClientDebugString()); | 245 string_builder.Append(ClientDebugString()); |
| 247 } | 246 } |
| 248 string_builder.Append("\", visualRect: \""); | |
| 249 string_builder.Append(VisualRect().ToString()); | |
| 250 string_builder.Append("\", type: \""); | 247 string_builder.Append("\", type: \""); |
| 251 string_builder.Append(TypeAsDebugString(GetType())); | 248 string_builder.Append(TypeAsDebugString(GetType())); |
| 252 string_builder.Append('"'); | 249 string_builder.Append('"'); |
| 253 if (skipped_cache_) | 250 if (skipped_cache_) |
| 254 string_builder.Append(", skippedCache: true"); | 251 string_builder.Append(", skippedCache: true"); |
| 255 } | 252 } |
| 256 | 253 |
| 257 #endif | 254 #endif |
| 258 | 255 |
| 259 } // namespace blink | 256 } // namespace blink |
| OLD | NEW |