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

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

Issue 2049263003: Check rect under-invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ImageQuality
Patch Set: x Created 4 years, 6 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 feeb006ae8260deecb1a2ac31faa9bad1f38a1fe..b18c2a16609a74d0189fa255d766f8f7e86d1a15 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -365,11 +365,6 @@ void PaintController::commitNewDisplayItems(const LayoutSize& offsetFromLayoutOb
outOfOrderIndexContext.nextItemToIndex = currentIt;
}
-#if DCHECK_IS_ON()
- if (RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled())
- checkNoRemainingCachedDisplayItems();
-#endif
-
// TODO(jbroman): When subsequence caching applies to SPv2, we'll need to
// merge the paint chunks as well.
m_currentPaintArtifact = PaintArtifact(std::move(updatedList), m_newPaintChunks.releasePaintChunks(), gpuAnalyzer.suitableForGpuRasterization());
@@ -416,6 +411,14 @@ void PaintController::updateCacheGeneration()
#endif
}
+void PaintController::appendDebugDrawingAfterCommit(const DisplayItemClient& displayItemClient, PassRefPtr<SkPicture> picture, const LayoutSize& offsetFromLayoutObject)
+{
+ DCHECK(m_newDisplayItemList.isEmpty());
+ DrawingDisplayItem& displayItem = m_currentPaintArtifact.getDisplayItemList().allocateAndConstruct<DrawingDisplayItem>(displayItemClient, DisplayItem::DebugDrawing, picture);
+ displayItem.setSkippedCache();
+ m_currentPaintArtifact.getDisplayItemList().appendVisualRect(visualRectForDisplayItem(displayItem, offsetFromLayoutObject));
+}
+
#if DCHECK_IS_ON()
void PaintController::checkUnderInvalidation(DisplayItemList::iterator& newIt, DisplayItemList::iterator& currentIt)
@@ -503,17 +506,6 @@ void PaintController::checkCachedDisplayItemIsUnchanged(const char* messagePrefi
NOTREACHED();
}
-void PaintController::checkNoRemainingCachedDisplayItems()
-{
- DCHECK(RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled());
-
- for (const auto& displayItem : m_currentPaintArtifact.getDisplayItemList()) {
- if (!displayItem.hasValidClient() || !displayItem.isCacheable() || !clientCacheIsValid(displayItem.client()))
- continue;
- showUnderInvalidationError("", "May be under-invalidation: no new display item", nullptr, &displayItem);
- }
-}
-
#endif // DCHECK_IS_ON()
#ifndef NDEBUG

Powered by Google App Engine
This is Rietveld 408576698