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

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

Issue 1287863003: Avoid re-iterate out-of-order display items (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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.h
diff --git a/Source/platform/graphics/paint/DisplayItem.h b/Source/platform/graphics/paint/DisplayItem.h
index 55f0db17720c57a732e940235ab47d5a6b2e1887..d9a811653199a5608e12ae52b44ed8040a500f32 100644
--- a/Source/platform/graphics/paint/DisplayItem.h
+++ b/Source/platform/graphics/paint/DisplayItem.h
@@ -184,7 +184,6 @@ public:
, m_type(type)
, m_derivedSize(derivedSize)
, m_skippedCache(false)
- , m_ignoredFromList(false)
#ifndef NDEBUG
, m_clientDebugString(client.debugName())
#endif
@@ -329,8 +328,8 @@ public:
virtual bool drawsContent() const { return false; }
- bool ignoreFromDisplayList() const { return m_ignoredFromList; }
- void setIgnoredFromDisplayList() { m_ignoredFromList = true; }
+ bool isValid() const { return m_client; }
+ void invalidate() { new (this) DisplayItem; }
pdr. 2015/08/17 23:28:50 Will this run the DisplayItem subclass destructors
Xianzhu 2015/08/17 23:46:58 No but needed. Added an in-place destructor call.
#ifndef NDEBUG
static WTF::String typeAsDebugString(DisplayItem::Type);
@@ -351,7 +350,6 @@ private:
, m_type(UninitializedType)
, m_derivedSize(sizeof(*this))
, m_skippedCache(false)
- , m_ignoredFromList(true)
#ifndef NDEBUG
, m_clientDebugString("invalid")
#endif
@@ -363,7 +361,6 @@ private:
const Type m_type : 16;
unsigned m_derivedSize : 8; // size of the actual derived class
unsigned m_skippedCache : 1;
- unsigned m_ignoredFromList : 1;
#ifndef NDEBUG
WTF::String m_clientDebugString;

Powered by Google App Engine
This is Rietveld 408576698