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

Unified Diff: gpu/command_buffer/service/gpu_tracer.h

Issue 799753009: Added GPU Tracing for DoSwapBuffers() to track frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use generic scoped gpu tracer 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 | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_tracer.h
diff --git a/gpu/command_buffer/service/gpu_tracer.h b/gpu/command_buffer/service/gpu_tracer.h
index 64f13cc6f63eeeac1c29473b56750121fc4f96e0..fb490757bad0bba8707adcd57b339ea7055a9aed 100644
--- a/gpu/command_buffer/service/gpu_tracer.h
+++ b/gpu/command_buffer/service/gpu_tracer.h
@@ -213,6 +213,24 @@ class GPU_EXPORT GPUTrace
DISALLOW_COPY_AND_ASSIGN(GPUTrace);
};
+class ScopedGPUTrace {
+ public:
+ ScopedGPUTrace(GPUTracer* gpu_tracer, GpuTracerSource source,
+ const std::string& category, const std::string& name)
+ : gpu_tracer_(gpu_tracer),
+ source_(source) {
+ gpu_tracer_->Begin(category, name, source_);
+ }
+
+ ~ScopedGPUTrace() {
+ gpu_tracer_->End(source_);
+ }
+
+ private:
+ GPUTracer* gpu_tracer_;
+ GpuTracerSource source_;
+};
+
} // namespace gles2
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698