Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2642)

Unified Diff: Source/platform/graphics/paint/DisplayItem.cpp

Issue 1160763005: Don't cache reflection drawings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix win (which doesn't pack bool bitfields) Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/paint/DisplayItem.cpp
diff --git a/Source/platform/graphics/paint/DisplayItem.cpp b/Source/platform/graphics/paint/DisplayItem.cpp
index 950cdc2139e2d53e74396614363c0f0336d67a07..58b42d478555af9c107f94ffbf8970ca5c0fd752 100644
--- a/Source/platform/graphics/paint/DisplayItem.cpp
+++ b/Source/platform/graphics/paint/DisplayItem.cpp
@@ -10,15 +10,12 @@ 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.
#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
@@ -204,8 +201,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
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItemCacheSkipper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698