summaryrefslogtreecommitdiffstats
path: root/cc/program_binding.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-17 00:50:19 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-17 00:50:19 +0000
commitbc3847a1ba39db7adec20aa9e0565f6e868e8480 (patch)
tree572eb2450ffd1bcee7f1932974f04de80c179e90 /cc/program_binding.h
parenteff7a36630d6c8f86921dff9128c8be47d7c5021 (diff)
downloadchromium_src-bc3847a1ba39db7adec20aa9e0565f6e868e8480.zip
chromium_src-bc3847a1ba39db7adec20aa9e0565f6e868e8480.tar.gz
chromium_src-bc3847a1ba39db7adec20aa9e0565f6e868e8480.tar.bz2
cc: Switch to Chromium DCHECKs LOGs
We can't compile-guard code and use DCHECK since it can be enabled at runtime. This removes all compile-time guards, and makes use of DCHECK instead of ASSERT. We use DCHECK_IS_ON() to early out and avoid extra work just for DCHECK where possible as well. This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo"; R=enne,jamesr Review URL: https://chromiumcodereview.appspot.com/11048044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/program_binding.h')
-rw-r--r--cc/program_binding.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/cc/program_binding.h b/cc/program_binding.h
index 28f628c..3ddc0b4 100644
--- a/cc/program_binding.h
+++ b/cc/program_binding.h
@@ -7,6 +7,8 @@
#include <string>
+#include "base/logging.h"
+
namespace WebKit {
class WebGraphicsContext3D;
}
@@ -22,7 +24,7 @@ public:
void link(WebKit::WebGraphicsContext3D*);
void cleanup(WebKit::WebGraphicsContext3D*);
- unsigned program() const { ASSERT(m_initialized); return m_program; }
+ unsigned program() const { DCHECK(m_initialized); return m_program; }
bool initialized() const { return m_initialized; }
protected:
@@ -47,9 +49,9 @@ public:
void initialize(WebKit::WebGraphicsContext3D* context, bool usingBindUniform)
{
- ASSERT(context);
- ASSERT(m_program);
- ASSERT(!m_initialized);
+ DCHECK(context);
+ DCHECK(m_program);
+ DCHECK(!m_initialized);
// Need to bind uniforms before linking
if (!usingBindUniform)