| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index 3811ac8d9674c527329011fcb7d38a9cbe118248..06da361c81da87b06ff77405ee6179b3338c9c7b 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -1959,7 +1959,9 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group)
|
| if ((gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2 &&
|
| !feature_info_->feature_flags().chromium_webglsl &&
|
| !force_webgl_glsl_validation_) ||
|
| - gfx::GetGLImplementation() == gfx::kGLImplementationMockGL) {
|
| + gfx::GetGLImplementation() == gfx::kGLImplementationMockGL ||
|
| + CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableGLSLTranslator)) {
|
| use_shader_translator_ = false;
|
| }
|
|
|
| @@ -1988,6 +1990,11 @@ bool GLES2DecoderImpl::Initialize(
|
| set_debug(true);
|
| }
|
|
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableGPUCommandLogging)) {
|
| + set_log_commands(true);
|
| + }
|
| +
|
| compile_shader_always_succeeds_ = CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kCompileShaderAlwaysSucceeds);
|
|
|
| @@ -3091,7 +3098,9 @@ error::Error GLES2DecoderImpl::DoCommand(
|
| const void* cmd_data) {
|
| error::Error result = error::kNoError;
|
| if (log_commands()) {
|
| - LOG(INFO) << "[" << this << "]" << "cmd: " << GetCommandName(command);
|
| + // TODO(notme): Change this to a LOG/VLOG that works in release. Tried
|
| + // LOG(INFO), tried VLOG(1), no luck.
|
| + LOG(ERROR) << "[" << this << "]" << "cmd: " << GetCommandName(command);
|
| }
|
| unsigned int command_index = command - kStartPoint - 1;
|
| if (command_index < arraysize(g_command_info)) {
|
| @@ -3115,10 +3124,10 @@ error::Error GLES2DecoderImpl::DoCommand(
|
| if (debug()) {
|
| GLenum error;
|
| while ((error = glGetError()) != GL_NO_ERROR) {
|
| + LOG(ERROR) << "[" << this << "] "
|
| + << "GL ERROR: " << GLES2Util::GetStringEnum(error) << " : "
|
| + << GetCommandName(command);
|
| SetGLError(error, "GL error from driver");
|
| - LOG(INFO) << "[" << this << "]"
|
| - << "GL ERROR: " << GLES2Util::GetStringEnum(error) << " : "
|
| - << GetCommandName(command);
|
| }
|
| }
|
| } else {
|
|
|