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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h

Issue 1387923002: LayoutObject::invalidatePaintIfNeededForSynchronizedPainting() and plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: 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.

Powered by Google App Engine
This is Rietveld 408576698