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

Unified Diff: cc/program_binding.cc

Issue 11192030: cc: Switch to Chromium DCHECKs LOGs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseonenne 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/program_binding.h ('k') | cc/proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/program_binding.cc
diff --git a/cc/program_binding.cc b/cc/program_binding.cc
index 3cceaa15fb1bb003639b5663e7f4ec870ca4625a..26ba50251f66e1e2af7137450b0b4f74e802dcc5 100644
--- a/cc/program_binding.cc
+++ b/cc/program_binding.cc
@@ -27,10 +27,10 @@ ProgramBindingBase::ProgramBindingBase()
ProgramBindingBase::~ProgramBindingBase()
{
// If you hit these asserts, you initialized but forgot to call cleanup().
- ASSERT(!m_program);
- ASSERT(!m_vertexShaderId);
- ASSERT(!m_fragmentShaderId);
- ASSERT(!m_initialized);
+ DCHECK(!m_program);
+ DCHECK(!m_vertexShaderId);
+ DCHECK(!m_fragmentShaderId);
+ DCHECK(!m_initialized);
}
static bool contextLost(WebGraphicsContext3D* context)
@@ -45,7 +45,7 @@ void ProgramBindingBase::init(WebGraphicsContext3D* context, const std::string&
m_vertexShaderId = loadShader(context, GraphicsContext3D::VERTEX_SHADER, vertexShader);
if (!m_vertexShaderId) {
if (!contextLost(context))
- LOG_ERROR("Failed to create vertex shader");
+ LOG(ERROR) << "Failed to create vertex shader";
return;
}
@@ -54,12 +54,12 @@ void ProgramBindingBase::init(WebGraphicsContext3D* context, const std::string&
GLC(context, context->deleteShader(m_vertexShaderId));
m_vertexShaderId = 0;
if (!contextLost(context))
- LOG_ERROR("Failed to create fragment shader");
+ LOG(ERROR) << "Failed to create fragment shader";
return;
}
m_program = createShaderProgram(context, m_vertexShaderId, m_fragmentShaderId);
- ASSERT(m_program || contextLost(context));
+ DCHECK(m_program || contextLost(context));
}
void ProgramBindingBase::link(WebGraphicsContext3D* context)
@@ -71,9 +71,8 @@ void ProgramBindingBase::link(WebGraphicsContext3D* context)
GLC(context, context->getProgramiv(m_program, GraphicsContext3D::LINK_STATUS, &linked));
if (!linked) {
if (!contextLost(context))
- LOG_ERROR("Failed to link shader program");
+ LOG(ERROR) << "Failed to link shader program";
GLC(context, context->deleteProgram(m_program));
- return;
}
#endif
}
@@ -84,7 +83,7 @@ void ProgramBindingBase::cleanup(WebGraphicsContext3D* context)
if (!m_program)
return;
- ASSERT(context);
+ DCHECK(context);
GLC(context, context->deleteProgram(m_program));
m_program = 0;
@@ -114,7 +113,7 @@ unsigned ProgramBindingBase::createShaderProgram(WebGraphicsContext3D* context,
unsigned programObject = context->createProgram();
if (!programObject) {
if (!contextLost(context))
- LOG_ERROR("Failed to create shader program");
+ LOG(ERROR) << "Failed to create shader program";
return 0;
}
« no previous file with comments | « cc/program_binding.h ('k') | cc/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698