| Index: gpu/command_buffer/client/gles2_implementation.cc
|
| diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
|
| index 4a9fc0bf911e185850c0323bd573fb7acd264409..e046f4c9af47e3c5762b51a7cd3b8bad48cc0002 100644
|
| --- a/gpu/command_buffer/client/gles2_implementation.cc
|
| +++ b/gpu/command_buffer/client/gles2_implementation.cc
|
| @@ -3270,10 +3270,29 @@ void GLES2Implementation::TraceBeginCHROMIUM(const char* name) {
|
| GPU_CLIENT_SINGLE_THREAD_CHECK();
|
| GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTraceBeginCHROMIUM("
|
| << name << ")");
|
| -
|
| + if (current_trace_name_.get()) {
|
| + SetGLError(GL_INVALID_OPERATION, "glTraceBeginCHROMIUM",
|
| + "trace already running");
|
| + return;
|
| + }
|
| + TRACE_EVENT_COPY_ASYNC_BEGIN0("gpu", name, this);
|
| SetBucketAsCString(kResultBucketId, name);
|
| helper_->TraceBeginCHROMIUM(kResultBucketId);
|
| helper_->SetBucketSize(kResultBucketId, 0);
|
| + current_trace_name_.reset(new std::string(name));
|
| +}
|
| +
|
| +void GLES2Implementation::TraceEndCHROMIUM() {
|
| + GPU_CLIENT_SINGLE_THREAD_CHECK();
|
| + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTraceEndCHROMIUM(" << ")");
|
| + if (!current_trace_name_.get()) {
|
| + SetGLError(GL_INVALID_OPERATION, "glTraceEndCHROMIUM",
|
| + "missing begin trace");
|
| + return;
|
| + }
|
| + helper_->TraceEndCHROMIUM();
|
| + TRACE_EVENT_COPY_ASYNC_END0("gpu", current_trace_name_->c_str(), this);
|
| + current_trace_name_.reset();
|
| }
|
|
|
| void* GLES2Implementation::MapBufferCHROMIUM(GLuint target, GLenum access) {
|
|
|