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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 2280003003: Clean up some assertion code in WebKit. (Closed)
Patch Set: Try to fix patchset deps again Created 4 years, 4 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/GraphicsContext.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
index 43ef58f8fabca3a7951566d19250c35075be5ee8..edbbe68e69f1baf1ffabe4243241bf19f13093ee 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
@@ -58,7 +58,7 @@ GraphicsContext::GraphicsContext(PaintController& paintController, DisabledMode
, m_paintController(paintController)
, m_paintStateStack()
, m_paintStateIndex(0)
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
, m_layerCount(0)
, m_disableDestructionChecks(false)
, m_inDrawingRecorder(false)
@@ -84,7 +84,7 @@ GraphicsContext::GraphicsContext(PaintController& paintController, DisabledMode
GraphicsContext::~GraphicsContext()
{
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
if (!m_disableDestructionChecks) {
ASSERT(!m_paintStateIndex);
ASSERT(!m_paintState->saveCount());
@@ -160,7 +160,7 @@ void GraphicsContext::restoreLayer()
m_canvas->restore();
}
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
void GraphicsContext::setInDrawingRecorder(bool val)
{
// Nested drawing recorers are not allowed.
@@ -246,7 +246,7 @@ void GraphicsContext::beginLayer(float opacity, SkXfermode::Mode xfermode, const
saveLayer(nullptr, &layerPaint);
}
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
++m_layerCount;
#endif
}

Powered by Google App Engine
This is Rietveld 408576698