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

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

Issue 2171553004: gpu: Fix crash in gpu tracer (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 aa85a88fe0c78a98da85f465891a96c1c4aa7c29..8905ee5f3be53522e5e735eb2d4f1e1e2c361995 100644
--- a/gpu/command_buffer/service/gpu_tracer.cc
+++ b/gpu/command_buffer/service/gpu_tracer.cc
@@ -271,6 +271,10 @@ bool GPUTracer::Begin(const std::string& category, const std::string& name,
// Push new marker from given 'source'
markers_[source].push_back(TraceMarker(category, name));
+ if (!outputter_) {
+ outputter_ = CreateOutputter(gpu_timing_client_->GetTimerTypeName());
+ }
+
// Create trace
if (IsTracing()) {
began_device_traces_ |= (*gpu_trace_dev_category != 0);
« 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