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

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

Issue 813573003: Fixed GPU tracing so the categories do not get mixed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted some unnecessary changes Created 5 years, 11 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 | « base/debug/trace_event.h ('k') | gpu/command_buffer/service/gpu_tracer.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 9ad567a0cca020744f954861b956303151992022..7f9166e3ab9e2bbdd7d6c1872bd5dd43289c11c2 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1878,7 +1878,6 @@ class GLES2DecoderImpl : public GLES2Decoder,
scoped_ptr<GPUStateTracer> gpu_state_tracer_;
const unsigned char* cb_command_trace_category_;
const unsigned char* gpu_decoder_category_;
- const unsigned char* gpu_group_marker_category_;
int gpu_trace_level_;
bool gpu_trace_commands_;
bool gpu_debug_commands_;
@@ -2396,8 +2395,6 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group)
TRACE_DISABLED_BY_DEFAULT("cb_command"))),
gpu_decoder_category_(TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(
TRACE_DISABLED_BY_DEFAULT("gpu_decoder"))),
- gpu_group_marker_category_(TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(
- TRACE_DISABLED_BY_DEFAULT("gpu_group_marker"))),
gpu_trace_level_(2),
gpu_trace_commands_(false),
gpu_debug_commands_(false),
@@ -11006,17 +11003,13 @@ void GLES2DecoderImpl::DoPushGroupMarkerEXT(
}
std::string name = length ? std::string(marker, length) : std::string(marker);
debug_marker_manager_.PushGroup(name);
- if (*gpu_group_marker_category_) {
- gpu_tracer_->Begin(TRACE_DISABLED_BY_DEFAULT("gpu_group_marker"), name,
- kTraceGroupMarker);
- }
+ gpu_tracer_->Begin(TRACE_DISABLED_BY_DEFAULT("gpu_group_marker"), name,
+ kTraceGroupMarker);
}
void GLES2DecoderImpl::DoPopGroupMarkerEXT(void) {
debug_marker_manager_.PopGroup();
- if (*gpu_group_marker_category_) {
- gpu_tracer_->End(kTraceGroupMarker);
- }
+ gpu_tracer_->End(kTraceGroupMarker);
}
void GLES2DecoderImpl::DoBindTexImage2DCHROMIUM(
@@ -11124,8 +11117,6 @@ error::Error GLES2DecoderImpl::HandleTraceBeginCHROMIUM(
return error::kInvalidArguments;
}
- TRACE_EVENT_COPY_ASYNC_BEGIN0(category_name.c_str(), trace_name.c_str(),
- this);
if (!gpu_tracer_->Begin(category_name, trace_name, kTraceCHROMIUM)) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION,
@@ -11136,16 +11127,11 @@ error::Error GLES2DecoderImpl::HandleTraceBeginCHROMIUM(
}
void GLES2DecoderImpl::DoTraceEndCHROMIUM() {
- if (gpu_tracer_->CurrentCategory().empty() ||
- gpu_tracer_->CurrentName().empty()) {
- LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION,
- "glTraceEndCHROMIUM", "no trace begin found");
+ if (!gpu_tracer_->End(kTraceCHROMIUM)) {
+ LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
+ "glTraceEndCHROMIUM", "no trace begin found");
return;
}
- TRACE_EVENT_COPY_ASYNC_END0(gpu_tracer_->CurrentCategory().c_str(),
- gpu_tracer_->CurrentName().c_str(), this);
- gpu_tracer_->End(kTraceCHROMIUM);
}
void GLES2DecoderImpl::DoDrawBuffersEXT(
« no previous file with comments | « base/debug/trace_event.h ('k') | gpu/command_buffer/service/gpu_tracer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698