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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp

Issue 2022563002: Remove display item scope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/PaintController.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
index 90192133f7a7e69b8c7b648b27e6b580a5127672..429108409f325e766a9d75eabdede88da760e6c9 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -82,8 +82,8 @@ void PaintController::processNewItem(DisplayItem& displayItem)
}
#endif
- if (!m_scopeStack.isEmpty())
- displayItem.setScope(m_scopeStack.last());
+ if (skippingCache())
+ displayItem.setSkippedCache();
#if DCHECK_IS_ON()
size_t index = findMatchingItemFromIndex(displayItem.nonCachedId(), m_newDisplayItemIndicesByClient, m_newDisplayItemList);
@@ -98,9 +98,6 @@ void PaintController::processNewItem(DisplayItem& displayItem)
addItemToIndexIfNeeded(displayItem, m_newDisplayItemList.size() - 1, m_newDisplayItemIndicesByClient);
#endif // DCHECK_IS_ON()
- if (skippingCache())
- displayItem.setSkippedCache();
-
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
m_newPaintChunks.incrementDisplayItemIndex(behaviorOfItemType(displayItem.getType()));
}
@@ -115,19 +112,6 @@ const PaintChunkProperties& PaintController::currentPaintChunkProperties() const
return m_newPaintChunks.currentPaintChunkProperties();
}
-void PaintController::beginScope()
-{
- SECURITY_DCHECK(m_nextScope < UINT_MAX);
- m_scopeStack.append(m_nextScope++);
- beginSkippingCache();
-}
-
-void PaintController::endScope()
-{
- m_scopeStack.removeLast();
- endSkippingCache();
-}
-
void PaintController::displayItemClientWasInvalidated(const DisplayItemClient& client)
{
#if DCHECK_IS_ON()
@@ -243,8 +227,7 @@ DisplayItemList::iterator PaintController::findOutOfOrderCachedItemForward(const
void PaintController::copyCachedSubsequence(const DisplayItemList& currentList, DisplayItemList::iterator& currentIt, DisplayItemList& updatedList, SkPictureGpuAnalyzer& gpuAnalyzer)
{
DCHECK(currentIt->getType() == DisplayItem::Subsequence);
- DCHECK(!currentIt->scope());
- DisplayItem::Id endSubsequenceId(currentIt->client(), DisplayItem::EndSubsequence, 0);
+ DisplayItem::Id endSubsequenceId(currentIt->client(), DisplayItem::EndSubsequence);
do {
// We should always find the EndSubsequence display item.
DCHECK(currentIt != m_currentPaintArtifact.getDisplayItemList().end());
@@ -280,9 +263,6 @@ void PaintController::commitNewDisplayItems(const LayoutSize& offsetFromLayoutOb
m_numCachedNewItems = 0;
// These data structures are used during painting only.
- DCHECK(m_scopeStack.isEmpty());
- m_scopeStack.clear();
- m_nextScope = 1;
DCHECK(!skippingCache());
#if DCHECK_IS_ON()
m_newDisplayItemIndicesByClient.clear();
@@ -458,7 +438,7 @@ void PaintController::checkUnderInvalidation(DisplayItemList::iterator& newIt, D
CString messagePrefix = "(In CachedSubsequence)";
#endif
- DisplayItem::Id endSubsequenceId(newIt->client(), DisplayItem::EndSubsequence, 0);
+ DisplayItem::Id endSubsequenceId(newIt->client(), DisplayItem::EndSubsequence);
while (true) {
DCHECK(newIt != m_newDisplayItemList.end());
if (newIt->isCached())

Powered by Google App Engine
This is Rietveld 408576698