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 b18c2a16609a74d0189fa255d766f8f7e86d1a15..ba87f0278c47ca356ad4304f16b0597ccc68760c 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
@@ -112,18 +112,6 @@ const PaintChunkProperties& PaintController::currentPaintChunkProperties() const |
return m_newPaintChunks.currentPaintChunkProperties(); |
} |
-void PaintController::displayItemClientWasInvalidated(const DisplayItemClient& client) |
-{ |
-#if DCHECK_IS_ON() |
- // Slimming paint v1 CompositedLayerMapping may invalidate client on extra layers. |
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() || clientCacheIsValid(client)) |
- m_invalidations.append(client.debugName()); |
- |
- // Should not invalidate already painted clients. |
- DCHECK(!m_newDisplayItemIndicesByClient.contains(&client)); |
-#endif |
-} |
- |
void PaintController::invalidateAll() |
{ |
// Can only be called during layout/paintInvalidation, not during painting. |
@@ -142,26 +130,6 @@ bool PaintController::clientCacheIsValid(const DisplayItemClient& client) const |
return client.displayItemsAreCached(m_currentCacheGeneration); |
} |
-void PaintController::invalidatePaintOffset(const DisplayItemClient& client) |
-{ |
- DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
- displayItemClientWasInvalidated(client); |
- client.setDisplayItemsUncached(); |
- |
-#if DCHECK_IS_ON() |
- DCHECK(!paintOffsetWasInvalidated(client)); |
- m_clientsWithPaintOffsetInvalidations.add(&client); |
-#endif |
-} |
- |
-#if DCHECK_IS_ON() |
-bool PaintController::paintOffsetWasInvalidated(const DisplayItemClient& client) const |
-{ |
- DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
- return m_clientsWithPaintOffsetInvalidations.contains(&client); |
-} |
-#endif |
- |
size_t PaintController::findMatchingItemFromIndex(const DisplayItem::Id& id, const DisplayItemIndicesByClientMap& displayItemIndicesByClient, const DisplayItemList& list) |
{ |
DisplayItemIndicesByClientMap::const_iterator it = displayItemIndicesByClient.find(&id.client); |
@@ -269,8 +237,6 @@ void PaintController::commitNewDisplayItems(const LayoutSize& offsetFromLayoutOb |
DCHECK(!skippingCache()); |
#if DCHECK_IS_ON() |
m_newDisplayItemIndicesByClient.clear(); |
- m_clientsWithPaintOffsetInvalidations.clear(); |
- m_invalidations.clear(); |
#endif |
SkPictureGpuAnalyzer gpuAnalyzer; |
@@ -313,10 +279,8 @@ void PaintController::commitNewDisplayItems(const LayoutSize& offsetFromLayoutOb |
bool isSynchronized = currentIt != currentEnd && newDisplayItemId.matches(*currentIt); |
if (newDisplayItemHasCachedType) { |
-#if DCHECK_IS_ON() |
DCHECK(newDisplayItem.isCached()); |
- DCHECK(clientCacheIsValid(newDisplayItem.client()) || (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && !paintOffsetWasInvalidated(newDisplayItem.client()))); |
-#endif |
+ DCHECK(clientCacheIsValid(newDisplayItem.client())); |
if (!isSynchronized) { |
currentIt = findOutOfOrderCachedItem(newDisplayItemId, outOfOrderIndexContext); |
@@ -348,12 +312,9 @@ void PaintController::commitNewDisplayItems(const LayoutSize& offsetFromLayoutOb |
DCHECK(updatedList.last().getType() == DisplayItem::EndSubsequence); |
} |
} else { |
-#if DCHECK_IS_ON() |
DCHECK(!newDisplayItem.isDrawing() |
|| newDisplayItem.skippedCache() |
- || !clientCacheIsValid(newDisplayItem.client()) |
- || (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && paintOffsetWasInvalidated(newDisplayItem.client()))); |
-#endif |
+ || !clientCacheIsValid(newDisplayItem.client())); |
updatedList.appendByMoving(*newIt, visualRectForDisplayItem(*newIt, offsetFromLayoutObject), gpuAnalyzer); |