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

Unified Diff: cc/dcheck.h

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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 | « cc/damage_tracker.cc ('k') | cc/debug_border_draw_quad.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/dcheck.h
diff --git a/cc/dcheck.h b/cc/dcheck.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b14b2c02cce2b3a7e4dc764068e73b78fc28d6d
--- /dev/null
+++ b/cc/dcheck.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_DCHECK_H_
+#define CC_DCHECK_H_
+
+#include "base/logging.h"
+
+// TODO(danakj): If we can convince the world to remove the --enable-dchecks
+// command line option, and have a compiler flag available in cc/dcheck.h
+// to tell if DCHECKs will be compiled, then remove this file and replace
+// all CC_CC_DCHECK() calls with CC_DCHECK() instead.
+
+#define CC_DCHECK_ENABLED() (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
+
+#if CC_DCHECK_ENABLED()
+#define CC_DCHECK(a) DCHECK(a)
+#else
+#define CC_DCHECK(a)
+#endif
+
+#endif // CC_DCHECK_H_
« no previous file with comments | « cc/damage_tracker.cc ('k') | cc/debug_border_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698