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 // This file contains the GPUTrace class. | 5 // This file contains the GPUTrace class. |
6 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ | 6 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ |
7 #define GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ | 7 #define GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 // Returns empty string if no current open trace. | 91 // Returns empty string if no current open trace. |
92 const std::string& CurrentCategory(GpuTracerSource source) const; | 92 const std::string& CurrentCategory(GpuTracerSource source) const; |
93 const std::string& CurrentName(GpuTracerSource source) const; | 93 const std::string& CurrentName(GpuTracerSource source) const; |
94 | 94 |
95 protected: | 95 protected: |
96 // Trace Processing. | 96 // Trace Processing. |
97 scoped_refptr<GPUTrace> CreateTrace(const std::string& category, | 97 scoped_refptr<GPUTrace> CreateTrace(const std::string& category, |
98 const std::string& name); | 98 const std::string& name); |
99 virtual scoped_refptr<Outputter> CreateOutputter(const std::string& name); | 99 virtual scoped_refptr<Outputter> CreateOutputter(const std::string& name); |
100 virtual scoped_refptr<CPUTime> CreateCPUTime(); | 100 virtual scoped_refptr<CPUTime> CreateCPUTime(); |
101 virtual GpuTracerType DetermineTracerType(); | 101 virtual GpuTracerType DetermineTracerType(gles2::GLES2Decoder* decoder); |
no sievers
2015/01/22 19:51:20
Why pass in the decoder (instead of simply accesss
David Yen
2015/01/22 21:43:02
Ah, I had a brain fart. Done.
| |
102 virtual void PostTask(); | 102 virtual void PostTask(); |
103 | 103 |
104 void Process(); | 104 void Process(); |
105 void ProcessTraces(); | 105 void ProcessTraces(); |
106 | 106 |
107 void CalculateTimerOffset(); | 107 void CalculateTimerOffset(); |
108 void IssueProcessTask(); | 108 void IssueProcessTask(); |
109 | 109 |
110 scoped_refptr<Outputter> outputter_; | 110 scoped_refptr<Outputter> outputter_; |
111 scoped_refptr<CPUTime> cpu_time_; | 111 scoped_refptr<CPUTime> cpu_time_; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
224 | 224 |
225 private: | 225 private: |
226 GPUTracer* gpu_tracer_; | 226 GPUTracer* gpu_tracer_; |
227 GpuTracerSource source_; | 227 GpuTracerSource source_; |
228 }; | 228 }; |
229 | 229 |
230 } // namespace gles2 | 230 } // namespace gles2 |
231 } // namespace gpu | 231 } // namespace gpu |
232 | 232 |
233 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ | 233 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ |
OLD | NEW |