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

Side by Side Diff: gpu/command_buffer/service/gpu_tracer.cc

Issue 1081483002: GPU Tracer no longer issue device traces when device category is off. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gpu_tracer.h" 5 #include "gpu/command_buffer/service/gpu_tracer.h"
6 6
7 #include <deque> 7 #include <deque>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 GPUTrace::GPUTrace(scoped_refptr<Outputter> outputter, 84 GPUTrace::GPUTrace(scoped_refptr<Outputter> outputter,
85 gfx::GPUTimingClient* gpu_timing_client, 85 gfx::GPUTimingClient* gpu_timing_client,
86 const std::string& category, 86 const std::string& category,
87 const std::string& name, 87 const std::string& name,
88 const bool enabled) 88 const bool enabled)
89 : category_(category), 89 : category_(category),
90 name_(name), 90 name_(name),
91 outputter_(outputter), 91 outputter_(outputter),
92 enabled_(enabled) { 92 enabled_(enabled) {
93 if (gpu_timing_client->IsAvailable() && 93 if (enabled &&
vmiura 2015/04/10 22:18:50 Thinking about this, "enabled" here and "tracing_s
David Yen 2015/04/10 22:36:09 Done.
94 gpu_timing_client->IsAvailable() &&
94 gpu_timing_client->IsTimerOffsetAvailable()) { 95 gpu_timing_client->IsTimerOffsetAvailable()) {
95 gpu_timer_ = gpu_timing_client->CreateGPUTimer(); 96 gpu_timer_ = gpu_timing_client->CreateGPUTimer();
96 } 97 }
97 } 98 }
98 99
99 GPUTrace::~GPUTrace() { 100 GPUTrace::~GPUTrace() {
100 } 101 }
101 102
102 void GPUTrace::Destroy(bool have_context) { 103 void GPUTrace::Destroy(bool have_context) {
103 if (gpu_timer_.get()) { 104 if (gpu_timer_.get()) {
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 void GPUTracer::IssueProcessTask() { 364 void GPUTracer::IssueProcessTask() {
364 if (finished_traces_.empty() || process_posted_) 365 if (finished_traces_.empty() || process_posted_)
365 return; 366 return;
366 367
367 process_posted_ = true; 368 process_posted_ = true;
368 PostTask(); 369 PostTask();
369 } 370 }
370 371
371 } // namespace gles2 372 } // namespace gles2
372 } // namespace gpu 373 } // namespace gpu
OLDNEW
« 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