OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 25 matching lines...) Expand all Loading... |
36 "Trace source names must match enumeration."); | 36 "Trace source names must match enumeration."); |
37 | 37 |
38 static TraceOutputter* g_outputter_thread = NULL; | 38 static TraceOutputter* g_outputter_thread = NULL; |
39 | 39 |
40 TraceMarker::TraceMarker(const std::string& category, const std::string& name) | 40 TraceMarker::TraceMarker(const std::string& category, const std::string& name) |
41 : category_(category), | 41 : category_(category), |
42 name_(name), | 42 name_(name), |
43 trace_(NULL) { | 43 trace_(NULL) { |
44 } | 44 } |
45 | 45 |
| 46 TraceMarker::TraceMarker(const TraceMarker& other) = default; |
| 47 |
46 TraceMarker::~TraceMarker() { | 48 TraceMarker::~TraceMarker() { |
47 } | 49 } |
48 | 50 |
49 scoped_refptr<TraceOutputter> TraceOutputter::Create(const std::string& name) { | 51 scoped_refptr<TraceOutputter> TraceOutputter::Create(const std::string& name) { |
50 if (!g_outputter_thread) { | 52 if (!g_outputter_thread) { |
51 g_outputter_thread = new TraceOutputter(name); | 53 g_outputter_thread = new TraceOutputter(name); |
52 } | 54 } |
53 return g_outputter_thread; | 55 return g_outputter_thread; |
54 } | 56 } |
55 | 57 |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 } | 412 } |
411 | 413 |
412 while (!finished_traces_.empty()) { | 414 while (!finished_traces_.empty()) { |
413 finished_traces_.front()->Destroy(have_context); | 415 finished_traces_.front()->Destroy(have_context); |
414 finished_traces_.pop_front(); | 416 finished_traces_.pop_front(); |
415 } | 417 } |
416 } | 418 } |
417 | 419 |
418 } // namespace gles2 | 420 } // namespace gles2 |
419 } // namespace gpu | 421 } // namespace gpu |
OLD | NEW |