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

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

Issue 1138603002: Fix some issues with the GPU Tracer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed glFlush(), land later and monitor metrics Created 5 years, 7 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 <deque> 9 #include <deque>
10 #include <stack>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/basictypes.h" 14 #include "base/basictypes.h"
14 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
16 #include "base/threading/thread.h" 17 #include "base/threading/thread.h"
17 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
18 #include "gpu/gpu_export.h" 19 #include "gpu/gpu_export.h"
19 20
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void TraceServiceEnd(GpuTracerSource source, 143 void TraceServiceEnd(GpuTracerSource source,
143 const std::string& category, 144 const std::string& category,
144 const std::string& name) override; 145 const std::string& name) override;
145 146
146 protected: 147 protected:
147 friend class base::RefCounted<Outputter>; 148 friend class base::RefCounted<Outputter>;
148 explicit TraceOutputter(const std::string& name); 149 explicit TraceOutputter(const std::string& name);
149 ~TraceOutputter() override; 150 ~TraceOutputter() override;
150 151
151 base::Thread named_thread_; 152 base::Thread named_thread_;
153 uint64 local_trace_device_id_ = 0;
154 uint64 local_trace_service_id_ = 0;
155
156 std::stack<uint64> trace_service_id_stack_[NUM_TRACER_SOURCES];
152 157
153 private: 158 private:
154 DISALLOW_COPY_AND_ASSIGN(TraceOutputter); 159 DISALLOW_COPY_AND_ASSIGN(TraceOutputter);
155 }; 160 };
156 161
157 class GPU_EXPORT GPUTrace 162 class GPU_EXPORT GPUTrace
158 : public base::RefCounted<GPUTrace> { 163 : public base::RefCounted<GPUTrace> {
159 public: 164 public:
160 GPUTrace(scoped_refptr<Outputter> outputter, 165 GPUTrace(scoped_refptr<Outputter> outputter,
161 gfx::GPUTimingClient* gpu_timing_client, 166 gfx::GPUTimingClient* gpu_timing_client,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 211
207 private: 212 private:
208 GPUTracer* gpu_tracer_; 213 GPUTracer* gpu_tracer_;
209 GpuTracerSource source_; 214 GpuTracerSource source_;
210 }; 215 };
211 216
212 } // namespace gles2 217 } // namespace gles2
213 } // namespace gpu 218 } // namespace gpu
214 219
215 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ 220 #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