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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintController.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp b/third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp
index cdc23e9bea6b68301636a58f35efa4d4f04a833b..3905adda144bfafdfda3ecedbad9ebde7b6e44de 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp
@@ -26,6 +26,10 @@ SkPictureBuilder::SkPictureBuilder(const FloatRect& bounds,
m_paintControllerPtr = PaintController::create();
m_paintController = m_paintControllerPtr.get();
}
+#if DCHECK_IS_ON()
+ m_paintController->setUsage(PaintController::ForSkPictureBuilder);
+#endif
+
m_context = wrapUnique(
new GraphicsContext(*m_paintController, disabledMode, metaData));
@@ -35,7 +39,11 @@ SkPictureBuilder::SkPictureBuilder(const FloatRect& bounds,
}
}
-SkPictureBuilder::~SkPictureBuilder() {}
+SkPictureBuilder::~SkPictureBuilder() {
+#if DCHECK_IS_ON()
+ m_paintController->setUsage(PaintController::ForNormalUsage);
+#endif
+}
sk_sp<SkPicture> SkPictureBuilder::endRecording() {
m_context->beginRecording(m_bounds);
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698