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

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

Issue 327323002: Start removing the double-negative !ASSERT_DISABLED (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | Source/platform/graphics/Image.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 338e34d916f44c68a43f8b45f6532a4ad38c782c..7eb2872a2bb7dc984447d6a6c658fc0c39c333ef 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -116,7 +116,7 @@ GraphicsContext::GraphicsContext(SkCanvas* canvas, DisabledMode disableContextOr
, m_paintStateIndex(0)
, m_pendingCanvasSave(false)
, m_annotationMode(0)
-#if !ASSERT_DISABLED
+#if ASSERT_ENABLED
, m_annotationCount(0)
, m_layerCount(0)
, m_disableDestructionChecks(false)
@@ -142,7 +142,7 @@ GraphicsContext::GraphicsContext(SkCanvas* canvas, DisabledMode disableContextOr
GraphicsContext::~GraphicsContext()
{
-#if !ASSERT_DISABLED
+#if ASSERT_ENABLED
if (!m_disableDestructionChecks) {
ASSERT(!m_paintStateIndex);
ASSERT(!m_paintState->saveCount());
@@ -226,7 +226,7 @@ void GraphicsContext::beginAnnotation(const char* rendererName, const char* pain
for (AnnotationList::const_iterator it = annotations.begin(); it != end; ++it)
canvas()->addComment(it->first, it->second.ascii().data());
-#if !ASSERT_DISABLED
+#if ASSERT_ENABLED
++m_annotationCount;
#endif
}
@@ -239,7 +239,7 @@ void GraphicsContext::endAnnotation()
canvas()->endCommentGroup();
ASSERT(m_annotationCount > 0);
-#if !ASSERT_DISABLED
+#if ASSERT_ENABLED
--m_annotationCount;
#endif
}
@@ -463,7 +463,7 @@ void GraphicsContext::beginLayer(float opacity, CompositeOperator op, const Floa
saveLayer(0, &layerPaint);
}
-#if !ASSERT_DISABLED
+#if ASSERT_ENABLED
++m_layerCount;
#endif
}
@@ -476,7 +476,7 @@ void GraphicsContext::endLayer()
restoreLayer();
ASSERT(m_layerCount > 0);
-#if !ASSERT_DISABLED
+#if ASSERT_ENABLED
--m_layerCount;
#endif
}
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698