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

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

Issue 855653003: GPU Traces now use synchronous traces for detailed CPU Wall times. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed some issues Created 5 years, 11 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 | gpu/command_buffer/service/gpu_tracer.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 // 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 }; 127 };
128 128
129 class Outputter : public base::RefCounted<Outputter> { 129 class Outputter : public base::RefCounted<Outputter> {
130 public: 130 public:
131 virtual void TraceDevice(const std::string& category, 131 virtual void TraceDevice(const std::string& category,
132 const std::string& name, 132 const std::string& name,
133 int64 start_time, 133 int64 start_time,
134 int64 end_time) = 0; 134 int64 end_time) = 0;
135 135
136 virtual void TraceServiceBegin(const std::string& category, 136 virtual void TraceServiceBegin(const std::string& category,
137 const std::string& name, 137 const std::string& name) = 0;
138 void* id) = 0;
139 138
140 virtual void TraceServiceEnd(const std::string& category, 139 virtual void TraceServiceEnd(const std::string& category,
141 const std::string& name, 140 const std::string& name) = 0;
142 void* id) = 0;
143 141
144 protected: 142 protected:
145 virtual ~Outputter() {} 143 virtual ~Outputter() {}
146 friend class base::RefCounted<Outputter>; 144 friend class base::RefCounted<Outputter>;
147 }; 145 };
148 146
149 class TraceOutputter : public Outputter { 147 class TraceOutputter : public Outputter {
150 public: 148 public:
151 static scoped_refptr<TraceOutputter> Create(const std::string& name); 149 static scoped_refptr<TraceOutputter> Create(const std::string& name);
152 void TraceDevice(const std::string& category, 150 void TraceDevice(const std::string& category,
153 const std::string& name, 151 const std::string& name,
154 int64 start_time, 152 int64 start_time,
155 int64 end_time) override; 153 int64 end_time) override;
156 154
157 void TraceServiceBegin(const std::string& category, 155 void TraceServiceBegin(const std::string& category,
158 const std::string& name, 156 const std::string& name) override;
159 void* id) override;
160 157
161 void TraceServiceEnd(const std::string& category, 158 void TraceServiceEnd(const std::string& category,
162 const std::string& name, 159 const std::string& name) override;
163 void* id) override;
164 160
165 protected: 161 protected:
166 friend class base::RefCounted<Outputter>; 162 friend class base::RefCounted<Outputter>;
167 explicit TraceOutputter(const std::string& name); 163 explicit TraceOutputter(const std::string& name);
168 ~TraceOutputter() override; 164 ~TraceOutputter() override;
169 165
170 base::Thread named_thread_; 166 base::Thread named_thread_;
171 uint64 local_trace_id_; 167 uint64 local_trace_id_;
172 168
173 DISALLOW_COPY_AND_ASSIGN(TraceOutputter); 169 DISALLOW_COPY_AND_ASSIGN(TraceOutputter);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 206
211 GLuint queries_[2]; 207 GLuint queries_[2];
212 208
213 DISALLOW_COPY_AND_ASSIGN(GPUTrace); 209 DISALLOW_COPY_AND_ASSIGN(GPUTrace);
214 }; 210 };
215 211
216 } // namespace gles2 212 } // namespace gles2
217 } // namespace gpu 213 } // namespace gpu
218 214
219 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ 215 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gpu_tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698