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

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
« no previous file with comments | « Source/platform/graphics/ContiguousContainer.h ('k') | Source/platform/graphics/paint/DisplayItem.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c5cecd6d1c20a05f2f85466716919f60768c1eef 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
@@ -195,6 +194,8 @@ public:
ASSERT_WITH_SECURITY_IMPLICATION(derivedSize >= sizeof(*this));
}
+ virtual ~DisplayItem() { }
+
// Ids are for matching new DisplayItems with existing DisplayItems.
struct Id {
Id(const DisplayItemClient client, const Type type, const unsigned scope)
@@ -233,8 +234,6 @@ public:
return Id(m_client, nonCachedType(), m_scope);
}
- virtual ~DisplayItem() { }
-
virtual void replay(GraphicsContext&) { }
DisplayItemClient client() const { return m_client; }
@@ -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 clearClientForUnderInvalidationChecking() { m_client = nullptr; }
#ifndef NDEBUG
static WTF::String typeAsDebugString(DisplayItem::Type);
@@ -351,19 +350,17 @@ private:
, m_type(UninitializedType)
, m_derivedSize(sizeof(*this))
, m_skippedCache(false)
- , m_ignoredFromList(true)
#ifndef NDEBUG
, m_clientDebugString("invalid")
#endif
{ }
- const DisplayItemClient m_client;
+ DisplayItemClient m_client;
unsigned m_scope;
static_assert(TypeLast < (1 << 16), "DisplayItem::Type should fit in 16 bits");
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;
« no previous file with comments | « Source/platform/graphics/ContiguousContainer.h ('k') | Source/platform/graphics/paint/DisplayItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698