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

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

Issue 860563003: Disable display item caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove beginNewPaints and m_doingNewPaints Created 5 years, 11 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/paint/DisplayItemList.h ('k') | 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 f4723e3b27c2f291c80104e8df8da8ae8adc2f5c..c2b800adb3cf2a7c2a151624e4769053f4c8d3ff 100644
--- a/Source/platform/graphics/paint/DisplayItemList.cpp
+++ b/Source/platform/graphics/paint/DisplayItemList.cpp
@@ -18,8 +18,7 @@ namespace blink {
const PaintList& DisplayItemList::paintList()
{
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
-
- updatePaintList();
+ ASSERT(m_newPaints.isEmpty());
return m_paintList;
}
@@ -44,6 +43,11 @@ void DisplayItemList::invalidateAll()
m_cachedClients.clear();
}
+bool DisplayItemList::clientCacheIsValid(DisplayItemClient client) const
+{
+ return RuntimeEnabledFeatures::slimmingPaintDisplayItemCacheEnabled() && m_cachedClients.contains(client);
+}
+
PaintList::iterator DisplayItemList::findNextMatchingCachedItem(PaintList::iterator begin, const DisplayItem& displayItem)
{
PaintList::iterator end = m_paintList.end();
@@ -74,6 +78,13 @@ static void appendDisplayItem(PaintList& list, HashSet<DisplayItemClient>& clien
// the ordering implied by the existing paint list, extra treewalks are avoided.
void DisplayItemList::updatePaintList()
{
+ if (!RuntimeEnabledFeatures::slimmingPaintDisplayItemCacheEnabled()) {
+ m_paintList.clear();
+ m_paintList.swap(m_newPaints);
+ m_cachedClients.clear();
+ return;
+ }
+
PaintList updatedList;
HashSet<DisplayItemClient> newCachedClients;
« no previous file with comments | « Source/platform/graphics/paint/DisplayItemList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698