Index: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
index 8827a61b67298d94e22d57b31d48b1859fa283dc..d866353a3f7c9dda98612f95702a625f0dfe2c5c 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
@@ -153,6 +153,17 @@ public: |
return m_trackedPaintInvalidationObjects ? *m_trackedPaintInvalidationObjects : Vector<String>(); |
} |
+ bool clientHasCheckedPaintInvalidation(DisplayItemClient client) const |
+ { |
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); |
+ return m_clientsCheckedPaintInvalidation.contains(client); |
+ } |
+ void setClientHasCheckedPaintInvalidation(DisplayItemClient client) |
+ { |
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); |
+ m_clientsCheckedPaintInvalidation.add(client); |
+ } |
+ |
protected: |
DisplayItemList() |
: m_currentDisplayItems(0) |
@@ -169,6 +180,8 @@ private: |
void updateValidlyCachedClientsIfNeeded() const; |
+ void invalidateClient(const DisplayItemClientWrapper&); |
+ |
#ifndef NDEBUG |
WTF::String displayItemsAsDebugString(const DisplayItems&) const; |
#endif |
@@ -200,11 +213,16 @@ private: |
// Contains all clients having valid cached paintings if updated. |
// It's lazily updated in updateValidlyCachedClientsIfNeeded(). |
- // FIXME: In the future we can replace this with client-side repaint flags |
+ // TODO(wangxianzhu): In the future we can replace this with client-side repaint flags |
// to avoid the cost of building and querying the hash table. |
mutable HashSet<DisplayItemClient> m_validlyCachedClients; |
mutable bool m_validlyCachedClientsDirty; |
+ // Used during painting. Contains clients that have checked paint invalidation and |
+ // are known to be valid. |
+ // TODO(wangxianzhu): Use client side flag to avoid const of hash table. |
+ HashSet<DisplayItemClient> m_clientsCheckedPaintInvalidation; |
+ |
#if ENABLE(ASSERT) |
// Set of clients which had paint offset changes since the last commit. This is used for |
// ensuring paint offsets are only updated once and are the same in all phases. |