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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPainter.cpp

Issue 2487273002: [No submit][SPInvalidation] Track paint offset change (Closed)
Patch Set: Created 4 years, 1 month 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/core/paint/ObjectPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
index 98c18abd55fff2f1a4611890f8a62084acaef77c..164cf74deca966d4d776031cfcd27046285964d3 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
@@ -694,4 +694,24 @@ void ObjectPainter::paintAllPhasesAtomically(const PaintInfo& paintInfo,
m_layoutObject.paint(info, paintOffset);
}
+#if DCHECK_IS_ON()
+void ObjectPainter::doCheckPaintOffset(const PaintInfo& paintInfo,
+ const LayoutPoint& paintOffset) {
+ if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() ||
+ paintInfo.getGlobalPaintFlags() != GlobalPaintNormalPhase ||
+ paintInfo.context.getPaintController().isSkippingCache() ||
+ m_layoutObject.isSVG())
+ return;
+
+ LayoutPoint adjustedPaintOffset = paintOffset;
+ if (m_layoutObject.isBox())
+ adjustedPaintOffset += toLayoutBox(m_layoutObject).location();
+ DCHECK(m_layoutObject.previousPaintOffset() == adjustedPaintOffset)
+ << m_layoutObject.debugName() << " paint offset mismatch:"
+ << " paint property paint offset: "
+ << m_layoutObject.previousPaintOffset().toString()
+ << " painter paint offset: " << adjustedPaintOffset.toString();
+}
+#endif
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPainter.h ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698