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

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

Issue 2549553002: Verify paintedOutputOfObjectHasNoEffectRegardlessOfSize during painting (Closed)
Patch Set: Remove from LayoutObject.h Created 4 years 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/DrawingRecorder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
index 351681624e5cdfdecfd198236ce1c1fc3a8103fd..6dc9701977ff0885244a9a779dc38f62f68f32df 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
@@ -79,9 +79,19 @@ DrawingRecorder::~DrawingRecorder() {
m_context.getPaintController().newDisplayItemList().size());
#endif
+ sk_sp<const SkPicture> picture = m_context.endRecording();
+
+#if DCHECK_IS_ON()
+ if (!RuntimeEnabledFeatures::slimmingPaintStrictCullRectClippingEnabled() &&
+ !m_context.getPaintController().isForSkPictureBuilder() &&
+ m_displayItemClient.paintedOutputOfObjectHasNoEffectRegardlessOfSize()) {
+ DCHECK_EQ(0, picture->approximateOpCount())
+ << m_displayItemClient.debugName();
+ }
+#endif
+
m_context.getPaintController().createAndAppend<DrawingDisplayItem>(
- m_displayItemClient, m_displayItemType, m_context.endRecording(),
- m_knownToBeOpaque);
+ m_displayItemClient, m_displayItemType, picture, m_knownToBeOpaque);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698