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

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

Issue 2151673003: Only create the GPUTracer outputer when actually tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | 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.cc
diff --git a/gpu/command_buffer/service/gpu_tracer.cc b/gpu/command_buffer/service/gpu_tracer.cc
index ac459c0138a722d4fe636c368bf80a273295f0ea..aa85a88fe0c78a98da85f465891a96c1c4aa7c29 100644
--- a/gpu/command_buffer/service/gpu_tracer.cc
+++ b/gpu/command_buffer/service/gpu_tracer.cc
@@ -211,12 +211,12 @@ bool GPUTracer::BeginDecoding() {
if (gpu_executing_)
return false;
- if (!outputter_) {
- outputter_ = CreateOutputter(gpu_timing_client_->GetTimerTypeName());
- }
-
gpu_executing_ = true;
if (IsTracing()) {
+ if (!outputter_) {
+ outputter_ = CreateOutputter(gpu_timing_client_->GetTimerTypeName());
+ }
+
CheckDisjointStatus();
// Begin a Trace for all active markers
for (int n = 0; n < NUM_TRACER_SOURCES; n++) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698