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

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

Issue 90333003: Remove --enable-gpu-service-logging and --enable-gpu-client-logging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gpu_switches.h » ('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 4633580ed724699cb4f31e39b9f486911b15e395..5386d5c5a553c57eb9a0b92654a8dcb5a903cc5c 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -494,14 +494,9 @@ bool GLES2Decoder::GetServiceTextureId(uint32 client_texture_id,
return false;
}
-GLES2Decoder::GLES2Decoder()
- : initialized_(false),
- debug_(false),
- log_commands_(false) {
-}
+GLES2Decoder::GLES2Decoder() : initialized_(false), debug_(false) {}
-GLES2Decoder::~GLES2Decoder() {
-}
+GLES2Decoder::~GLES2Decoder() {}
// This class implements GLES2Decoder so we don't have to expose all the GLES2
// cmd stuff to outside this class.
@@ -895,34 +890,6 @@ class GLES2DecoderImpl : public GLES2Decoder,
return program_manager()->GetProgram(client_id);
}
-#if defined(NDEBUG)
- void LogClientServiceMapping(
- const char* /* function_name */,
- GLuint /* client_id */,
- GLuint /* service_id */) {
- }
- template<typename T>
- void LogClientServiceForInfo(
- T* /* info */, GLuint /* client_id */, const char* /* function_name */) {
- }
-#else
- void LogClientServiceMapping(
- const char* function_name, GLuint client_id, GLuint service_id) {
- if (service_logging_) {
- DLOG(INFO) << "[" << logger_.GetLogPrefix() << "] " << function_name
- << ": client_id = " << client_id
- << ", service_id = " << service_id;
- }
- }
- template<typename T>
- void LogClientServiceForInfo(
- T* info, GLuint client_id, const char* function_name) {
- if (info) {
- LogClientServiceMapping(function_name, client_id, info->service_id());
- }
- }
-#endif
-
// Gets the program info for the given program. If it's not a program
// generates a GL error. Returns NULL if not program.
Program* GetProgramInfoNotShader(
@@ -936,7 +903,6 @@ class GLES2DecoderImpl : public GLES2Decoder,
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "unknown program");
}
}
- LogClientServiceForInfo(program, client_id, function_name);
return program;
}
@@ -969,7 +935,6 @@ class GLES2DecoderImpl : public GLES2Decoder,
GL_INVALID_VALUE, function_name, "unknown shader");
}
}
- LogClientServiceForInfo(shader, client_id, function_name);
return shader;
}
@@ -1674,9 +1639,6 @@ class GLES2DecoderImpl : public GLES2Decoder,
bool compile_shader_always_succeeds_;
- // Log extra info.
- bool service_logging_;
-
#if defined(OS_MACOSX)
typedef std::map<GLuint, CFTypeRef> TextureToIOSurfaceMap;
TextureToIOSurfaceMap texture_to_io_surface_map_;
@@ -2149,8 +2111,6 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group)
frag_depth_explicitly_enabled_(false),
draw_buffers_explicitly_enabled_(false),
compile_shader_always_succeeds_(false),
- service_logging_(CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableGPUServiceLoggingGPU)),
viewport_max_width_(0),
viewport_max_height_(0),
texture_state_(group_->feature_info()
@@ -2201,11 +2161,6 @@ 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);
@@ -3479,12 +3434,6 @@ error::Error GLES2DecoderImpl::DoCommand(
unsigned int arg_count,
const void* cmd_data) {
error::Error result = error::kNoError;
- if (log_commands()) {
- // TODO(notme): Change this to a LOG/VLOG that works in release. Tried
- // LOG(INFO), tried VLOG(1), no luck.
- LOG(ERROR) << "[" << logger_.GetLogPrefix() << "]" << "cmd: "
- << GetCommandName(command);
- }
unsigned int command_index = command - kStartPoint - 1;
if (command_index < arraysize(g_command_info)) {
const CommandInfo& info = g_command_info[command_index];
@@ -3595,7 +3544,6 @@ void GLES2DecoderImpl::DoBindBuffer(GLenum target, GLuint client_id) {
id_allocator->MarkAsUsed(client_id);
}
}
- LogClientServiceForInfo(buffer, client_id, "glBindBuffer");
if (buffer) {
if (!buffer_manager()->SetTarget(buffer, target)) {
LOCAL_SET_GL_ERROR(
@@ -3774,7 +3722,6 @@ void GLES2DecoderImpl::DoBindFramebuffer(GLenum target, GLuint client_id) {
}
framebuffer->MarkAsValid();
}
- LogClientServiceForInfo(framebuffer, client_id, "glBindFramebuffer");
if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER_EXT) {
framebuffer_state_.bound_draw_framebuffer = framebuffer;
@@ -3820,7 +3767,6 @@ void GLES2DecoderImpl::DoBindRenderbuffer(GLenum target, GLuint client_id) {
}
renderbuffer->MarkAsValid();
}
- LogClientServiceForInfo(renderbuffer, client_id, "glBindRenerbuffer");
state_.bound_renderbuffer = renderbuffer;
glBindRenderbufferEXT(target, service_id);
}
@@ -3865,7 +3811,6 @@ void GLES2DecoderImpl::DoBindTexture(GLenum target, GLuint client_id) {
"glBindTexture", "illegal target for stream texture.");
return;
}
- LogClientServiceForInfo(texture, client_id, "glBindTexture");
if (texture->target() == 0) {
texture_manager()->SetTarget(texture_ref, target);
}
@@ -5352,7 +5297,6 @@ void GLES2DecoderImpl::DoLinkProgram(GLuint program_id) {
return;
}
- LogClientServiceForInfo(program, program_id, "glLinkProgram");
ShaderTranslator* vertex_translator = NULL;
ShaderTranslator* fragment_translator = NULL;
if (use_shader_translator_) {
@@ -5830,7 +5774,6 @@ void GLES2DecoderImpl::DoUseProgram(GLuint program_id) {
state_.current_program.get());
}
state_.current_program = program;
- LogClientServiceMapping("glUseProgram", program_id, service_id);
glUseProgram(service_id);
if (state_.current_program.get()) {
program_manager()->UseProgram(state_.current_program.get());
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gpu_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698