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

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

Issue 1018053003: Remove blink::RuntimeEnabledFeatures::slimmingPaintDisplayItemCache (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 9 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/RuntimeEnabledFeatures.in ('k') | Source/web/WebRuntimeFeatures.cpp » ('j') | 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 eb61187f440b423d88367181dcbf0e4e73462f3f..1aa5be8c3ba85eff0163bc5d17fa7eb44d08bcf6 100644
--- a/Source/platform/graphics/paint/DisplayItemList.cpp
+++ b/Source/platform/graphics/paint/DisplayItemList.cpp
@@ -36,12 +36,10 @@ void DisplayItemList::add(WTF::PassOwnPtr<DisplayItem> displayItem)
// Remove the beginning display item of this empty pair.
m_newPaints.removeLast();
#if ENABLE(ASSERT)
- if (RuntimeEnabledFeatures::slimmingPaintDisplayItemCacheEnabled()) {
- // Also remove the index pointing to the removed display item.
- Vector<size_t>& indices = m_newDisplayItemIndicesByClient.find(displayItem->client())->value;
- if (!indices.isEmpty() && indices.last() == m_newPaints.size())
- indices.removeLast();
- }
+ // Also remove the index pointing to the removed display item.
+ Vector<size_t>& indices = m_newDisplayItemIndicesByClient.find(displayItem->client())->value;
+ if (!indices.isEmpty() && indices.last() == m_newPaints.size())
+ indices.removeLast();
#endif
return;
}
@@ -51,13 +49,11 @@ void DisplayItemList::add(WTF::PassOwnPtr<DisplayItem> displayItem)
displayItem->setScope(m_scopeStack.last().client, m_scopeStack.last().id);
#if ENABLE(ASSERT)
- if (RuntimeEnabledFeatures::slimmingPaintDisplayItemCacheEnabled()) {
- // This will check for duplicated display item ids.
- appendDisplayItem(m_newPaints, m_newDisplayItemIndicesByClient, displayItem);
- return;
- }
-#endif
+ // This will check for duplicated display item ids.
+ appendDisplayItem(m_newPaints, m_newDisplayItemIndicesByClient, displayItem);
+#else
m_newPaints.append(displayItem);
+#endif
}
void DisplayItemList::beginScope(DisplayItemClient client)
@@ -99,8 +95,7 @@ void DisplayItemList::invalidateAll()
bool DisplayItemList::clientCacheIsValid(DisplayItemClient client) const
{
- return RuntimeEnabledFeatures::slimmingPaintDisplayItemCacheEnabled()
- && m_cachedDisplayItemIndicesByClient.contains(client)
+ return m_cachedDisplayItemIndicesByClient.contains(client)
// If the scope is invalid, the client is treated invalid even if it's not invalidated explicitly.
&& (m_scopeStack.isEmpty() || m_scopeStack.last().cacheIsValid);
}
@@ -187,13 +182,6 @@ void DisplayItemList::updatePaintList()
ASSERT(m_scopeStack.isEmpty());
m_scopeStack.clear();
- if (!RuntimeEnabledFeatures::slimmingPaintDisplayItemCacheEnabled()) {
- m_paintList.clear();
- m_paintList.swap(m_newPaints);
- m_cachedDisplayItemIndicesByClient.clear();
- return;
- }
-
PaintList updatedList;
DisplayItemIndicesByClientMap newCachedDisplayItemIndicesByClient;
« no previous file with comments | « Source/platform/RuntimeEnabledFeatures.in ('k') | Source/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698