Chromium Code Reviews| Index: Source/platform/graphics/paint/DisplayItem.cpp |
| diff --git a/Source/platform/graphics/paint/DisplayItem.cpp b/Source/platform/graphics/paint/DisplayItem.cpp |
| index 94ea6a1a6aa9ad216abd4ac37496b8c5eb253bed..1efb3cb9c2990c5900c41eb4bb3af01973f1e840 100644 |
| --- a/Source/platform/graphics/paint/DisplayItem.cpp |
| +++ b/Source/platform/graphics/paint/DisplayItem.cpp |
| @@ -10,15 +10,13 @@ namespace blink { |
| struct SameSizeAsDisplayItem { |
| virtual ~SameSizeAsDisplayItem() { } // Allocate vtable pointer. |
| void* pointers[2]; |
| - int m_int; // Make sure m_int and m_type are next to each other so they are packed on 64-bit. |
| - DisplayItem::Type m_type; |
| + int ints[2]; // Make sure other fields are packed into two ints. |
|
chrishtr
2015/06/02 20:40:18
So DisplayItem has not gotten bigger due to this p
Xianzhu
2015/06/02 20:52:24
Right.
|
| #ifndef NDEBUG |
| WTF::String m_debugString; |
| #endif |
| }; |
| static_assert(sizeof(DisplayItem) == sizeof(SameSizeAsDisplayItem), "DisplayItem should stay small"); |
| -static_assert(sizeof(DisplayItem::Type) <= sizeof(int), "DisplayItem::Type should stay small"); |
| #ifndef NDEBUG |
| @@ -214,8 +212,10 @@ void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) |
| stringBuilder.append("\", type: \""); |
| stringBuilder.append(typeAsDebugString(type())); |
| stringBuilder.append('"'); |
| - if (m_id.scopeContainer) |
| - stringBuilder.append(String::format(", scope: \"%p,%d\"", m_id.scopeContainer, m_id.scopeId)); |
| + if (m_skippedCache) |
| + stringBuilder.append(", skippedCache: true"); |
| + if (m_scopeContainer) |
| + stringBuilder.append(String::format(", scope: \"%p,%d\"", m_scopeContainer, m_scopeId)); |
| } |
| #endif |