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

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

Issue 12150004: Category group support/Renamings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added destructor for CategoryFilter class per CQ failure. Created 7 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 | « content/renderer/render_thread_impl.cc ('k') | ppapi/shared_impl/ppb_trace_event_impl.cc » ('j') | 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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 virtual ~NoopTrace() {} 121 virtual ~NoopTrace() {}
122 122
123 DISALLOW_COPY_AND_ASSIGN(NoopTrace); 123 DISALLOW_COPY_AND_ASSIGN(NoopTrace);
124 }; 124 };
125 125
126 class GPUTracerImpl 126 class GPUTracerImpl
127 : public GPUTracer, 127 : public GPUTracer,
128 public base::SupportsWeakPtr<GPUTracerImpl> { 128 public base::SupportsWeakPtr<GPUTracerImpl> {
129 public: 129 public:
130 GPUTracerImpl() 130 GPUTracerImpl()
131 : gpu_category_enabled_(TRACE_EVENT_API_GET_CATEGORY_ENABLED("gpu")), 131 : gpu_category_enabled_(
132 TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED("gpu")),
132 process_posted_(false) { 133 process_posted_(false) {
133 } 134 }
134 virtual ~GPUTracerImpl() {} 135 virtual ~GPUTracerImpl() {}
135 136
136 // Implementation of gpu::gles2::GPUTracer 137 // Implementation of gpu::gles2::GPUTracer
137 virtual bool Begin(const std::string& name) OVERRIDE; 138 virtual bool Begin(const std::string& name) OVERRIDE;
138 virtual bool End() OVERRIDE; 139 virtual bool End() OVERRIDE;
139 virtual const std::string& CurrentName() const OVERRIDE; 140 virtual const std::string& CurrentName() const OVERRIDE;
140 141
141 // Process any completed traces. 142 // Process any completed traces.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } // namespace 337 } // namespace
337 338
338 scoped_ptr<GPUTracer> GPUTracer::Create() { 339 scoped_ptr<GPUTracer> GPUTracer::Create() {
339 if (gfx::g_driver_gl.ext.b_GL_ARB_timer_query) 340 if (gfx::g_driver_gl.ext.b_GL_ARB_timer_query)
340 return scoped_ptr<GPUTracer>(new GPUTracerARBTimerQuery()); 341 return scoped_ptr<GPUTracer>(new GPUTracerARBTimerQuery());
341 return scoped_ptr<GPUTracer>(new GPUTracerImpl()); 342 return scoped_ptr<GPUTracer>(new GPUTracerImpl());
342 } 343 }
343 344
344 } // namespace gles2 345 } // namespace gles2
345 } // namespace gpu 346 } // namespace gpu
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ppapi/shared_impl/ppb_trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698