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

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

Issue 1323253002: Let clientCacheIsValid count cacheable display item only (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/DisplayItemList.cpp
diff --git a/Source/platform/graphics/paint/DisplayItemList.cpp b/Source/platform/graphics/paint/DisplayItemList.cpp
index d54146d98dbdfa01912190385d958460d06395a7..9a0828a8217379159f449d32377de6213188a533 100644
--- a/Source/platform/graphics/paint/DisplayItemList.cpp
+++ b/Source/platform/graphics/paint/DisplayItemList.cpp
@@ -458,13 +458,14 @@ void DisplayItemList::updateValidlyCachedClientsIfNeeded() const
m_validlyCachedClients.clear();
m_validlyCachedClientsDirty = false;
- DisplayItemClient lastClient = nullptr;
+ DisplayItemClient lastAddedClient = nullptr;
for (const DisplayItem& displayItem : m_currentDisplayItems) {
- if (displayItem.client() == lastClient)
+ if (displayItem.client() == lastAddedClient)
continue;
- lastClient = displayItem.client();
- if (!displayItem.skippedCache())
- m_validlyCachedClients.add(lastClient);
+ if (displayItem.isCacheable()) {
+ lastAddedClient = displayItem.client();
+ m_validlyCachedClients.add(lastAddedClient);
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698