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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 9812021: make disable-glsl-translator work again (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copy switches from browser to gpu Created 8 years, 9 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 | « content/browser/gpu/gpu_process_host.cc ('k') | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698