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

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

Issue 2162603002: Reland of New PaintController under-invalidation checking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CommitOnTheWay
Patch Set: TestExpectations Created 4 years, 5 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.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.h b/third_party/WebKit/Source/platform/graphics/paint/PaintController.h
index 28324670645b376f8e760f71a4ddbeda6c121aeb..be361ce4511ce4085dac1290e1e2cdfef1233ba1 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.h
@@ -212,8 +212,9 @@ private:
#if DCHECK_IS_ON()
// The following two methods are for checking under-invalidations
// (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled).
- void checkUnderInvalidation(DisplayItemList::iterator& newIt, DisplayItemList::iterator& currentIt);
- void checkCachedDisplayItemIsUnchanged(const char* messagePrefix, const DisplayItem& newItem, const DisplayItem& oldItem);
+ void showUnderInvalidationError(const char* reason, const DisplayItem& newItem, const DisplayItem& oldItem) const;
+ void checkUnderInvalidation();
+ bool isCheckingUnderInvalidation() const { return m_underInvalidationCheckingEnd - m_underInvalidationCheckingBegin > 0; }
#endif
// The last complete paint artifact.
@@ -262,6 +263,15 @@ private:
// This is used to check duplicated ids during createAndAppend().
DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient;
+
+ // These are set in useCachedDrawingIfPossible() and useCachedSubsequenceIfPossible()
+ // when we could use cached drawing or subsequence and under-invalidation checking is on,
+ // indicating the begin and end of the cached drawing or subsequence in the current list.
+ // The functions return false to let the client do actual painting, and PaintController
+ // will check if the actual painting results are the same as the cached.
+ DisplayItemList::iterator m_underInvalidationCheckingBegin;
+ DisplayItemList::iterator m_underInvalidationCheckingEnd;
+ String m_underInvalidationMessagePrefix;
#endif
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS

Powered by Google App Engine
This is Rietveld 408576698