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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 11416117: Hookup the GPUTrace events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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 43b88a09f0fd78da586f001cf6166e380d9f7667..d4d31ff9e25c6da12d8d325a1180e0b77fdb93cf 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -3609,10 +3609,20 @@ void GLES2Implementation::TraceBeginCHROMIUM(const char* name) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTraceBeginCHROMIUM("
<< name << ")");
-
+ 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));
jonathan.backer 2012/12/03 14:23:14 Can we do a client side check if this is already s
dsinclair 2012/12/03 16:47:42 Done.
+}
+
+void GLES2Implementation::TraceEndCHROMIUM() {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTraceEndCHROMIUM(" << ")");
+ helper_->TraceEndCHROMIUM();
+
+ if (current_trace_name_.get())
+ TRACE_EVENT_COPY_ASYNC_END0("gpu", current_trace_name_->c_str(), this);
jonathan.backer 2012/12/03 14:23:14 else ERROR?
dsinclair 2012/12/03 16:47:42 Done.
}
void* GLES2Implementation::MapBufferCHROMIUM(GLuint target, GLenum access) {

Powered by Google App Engine
This is Rietveld 408576698