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

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

Issue 2480863002: DCHECK that paint properties are never null (Closed)
Patch Set: dcheckmate 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/platform/graphics/paint/CompositingRecorder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp b/third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp
index 53c03d1367190f460d3fbef1fe089b7ad3bfcda2..7930f26670f9003dd853b62b7e35205c4f48b8a7 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp
@@ -63,6 +63,14 @@ void CompositingRecorder::endCompositing(GraphicsContext& graphicsContext,
// Re-record the last two DisplayItems into a new SkPicture.
SkPictureBuilder pictureBuilder(cullRect, nullptr, &graphicsContext);
{
+#if DCHECK_IS_ON()
+ // The picture builder creates an internal paint controller that has been
+ // initialized with null paint properties. Painting into this controller
+ // without properties will not cause problems because the display item
+ // from this internal paint controller is immediately reunited with the
+ // correct properties.
+ DisableNullPaintPropertyChecks disabler;
+#endif
DrawingRecorder newRecorder(pictureBuilder.context(), displayItemClient,
displayItemType, cullRect);
DCHECK(!DrawingRecorder::useCachedDrawingIfPossible(

Powered by Google App Engine
This is Rietveld 408576698