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

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

Issue 1355753008: RuntimeEnabledFeatures::slimmingPaintOffsetCaching (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 | « Source/platform/RuntimeEnabledFeatures.in ('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 23c22e89f2912464be71bcbf4ba52f0e6d64c18c..8620e3349a5ff40258858dea1fb812dfa32a10b1 100644
--- a/Source/platform/graphics/paint/DisplayItemList.cpp
+++ b/Source/platform/graphics/paint/DisplayItemList.cpp
@@ -137,7 +137,7 @@ bool DisplayItemList::clientCacheIsValid(DisplayItemClient client) const
void DisplayItemList::invalidatePaintOffset(const DisplayItemClientWrapper& client)
{
- ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled());
updateValidlyCachedClientsIfNeeded();
m_validlyCachedClients.remove(client.displayItemClient());
@@ -158,20 +158,20 @@ void DisplayItemList::invalidatePaintOffset(const DisplayItemClientWrapper& clie
#if ENABLE(ASSERT)
bool DisplayItemList::paintOffsetWasInvalidated(DisplayItemClient client) const
{
- ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled());
return m_clientsWithPaintOffsetInvalidations.contains(client);
}
#endif
void DisplayItemList::recordPaintOffset(DisplayItemClient client, const LayoutPoint& paintOffset)
{
- ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled());
m_previousPaintOffsets.set(client, paintOffset);
}
bool DisplayItemList::paintOffsetIsUnchanged(DisplayItemClient client, const LayoutPoint& paintOffset) const
{
- ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled());
PreviousPaintOffsets::const_iterator it = m_previousPaintOffsets.find(client);
if (it == m_previousPaintOffsets.end())
return false;
@@ -180,7 +180,7 @@ bool DisplayItemList::paintOffsetIsUnchanged(DisplayItemClient client, const Lay
void DisplayItemList::removeUnneededPaintOffsetEntries()
{
- ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled());
// This function is only needed temporarily while paint offsets are stored
// in a map on the list itself. Because we don't always get notified when
@@ -309,7 +309,7 @@ void DisplayItemList::commitNewDisplayItems(DisplayListDiff*)
m_currentDisplayItems.swap(m_newDisplayItems);
m_validlyCachedClientsDirty = true;
m_numCachedItems = 0;
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled())
removeUnneededPaintOffsetEntries();
return;
}
@@ -336,7 +336,7 @@ void DisplayItemList::commitNewDisplayItems(DisplayListDiff*)
if (newDisplayItemHasCachedType) {
ASSERT(newDisplayItem.isCached());
- ASSERT(clientCacheIsValid(newDisplayItem.client()) || (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && !paintOffsetWasInvalidated(newDisplayItem.client())));
+ ASSERT(clientCacheIsValid(newDisplayItem.client()) || (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && !paintOffsetWasInvalidated(newDisplayItem.client())));
if (!isSynchronized) {
currentIt = findOutOfOrderCachedItem(newDisplayItemId, outOfOrderIndexContext);
@@ -370,7 +370,7 @@ void DisplayItemList::commitNewDisplayItems(DisplayListDiff*)
ASSERT(!newDisplayItem.isDrawing()
|| newDisplayItem.skippedCache()
|| !clientCacheIsValid(newDisplayItem.client())
- || (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && paintOffsetWasInvalidated(newDisplayItem.client())));
+ || (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && paintOffsetWasInvalidated(newDisplayItem.client())));
updatedList.appendByMoving(*newIt);
@@ -392,7 +392,7 @@ void DisplayItemList::commitNewDisplayItems(DisplayListDiff*)
m_currentDisplayItems.swap(updatedList);
m_numCachedItems = 0;
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled())
removeUnneededPaintOffsetEntries();
#if ENABLE(ASSERT)
« no previous file with comments | « Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698