| Index: cc/output/program_binding.cc
|
| diff --git a/cc/output/program_binding.cc b/cc/output/program_binding.cc
|
| index 8402e824492a93672d349fae0623380441c8c499..a8f4b6a9f6c29df4964dca45e7f07516020cff13 100644
|
| --- a/cc/output/program_binding.cc
|
| +++ b/cc/output/program_binding.cc
|
| @@ -177,24 +177,21 @@
|
| return !!program_;
|
| }
|
|
|
| -bool ProgramBindingBase::Link(GLES2Interface* context,
|
| - const std::string& vertex_source,
|
| - const std::string& fragment_source) {
|
| +bool ProgramBindingBase::Link(GLES2Interface* context) {
|
| context->LinkProgram(program_);
|
| CleanupShaders(context);
|
| if (!program_)
|
| return false;
|
| +#ifndef NDEBUG
|
| int linked = 0;
|
| context->GetProgramiv(program_, GL_LINK_STATUS, &linked);
|
| if (!linked) {
|
| char buffer[1024] = "";
|
| context->GetProgramInfoLog(program_, sizeof(buffer), nullptr, buffer);
|
| - LOG(ERROR) << "Error linking shader: " << buffer << "\n"
|
| - << "Vertex shader:\n"
|
| - << vertex_source << "Fragment shader:\n"
|
| - << fragment_source;
|
| - return false;
|
| - }
|
| + DLOG(ERROR) << "Error compiling shader: " << buffer;
|
| + return false;
|
| + }
|
| +#endif
|
| return true;
|
| }
|
|
|
| @@ -224,16 +221,17 @@
|
| shader_source_str,
|
| shader_length);
|
| context->CompileShader(shader);
|
| +#if DCHECK_IS_ON()
|
| int compiled = 0;
|
| context->GetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
|
| if (!compiled) {
|
| char buffer[1024] = "";
|
| context->GetShaderInfoLog(shader, sizeof(buffer), nullptr, buffer);
|
| - LOG(ERROR) << "Error compiling shader: " << buffer << "\n"
|
| - << "Shader program:\n"
|
| - << shader_source;
|
| + DLOG(ERROR) << "Error compiling shader: " << buffer
|
| + << "\n shader program: " << shader_source;
|
| return 0u;
|
| }
|
| +#endif
|
| return shader;
|
| }
|
|
|
|
|