OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #ifndef UI_GL_GPU_TIMING_H_ | 5 #ifndef UI_GL_GPU_TIMING_H_ |
6 #define UI_GL_GPU_TIMING_H_ | 6 #define UI_GL_GPU_TIMING_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 25 matching lines...) Expand all Loading... |
36 // Each virtual context as well as any other classes which need GPU times | 36 // Each virtual context as well as any other classes which need GPU times |
37 // will hold one of these. When they want to time a set of GL commands they | 37 // will hold one of these. When they want to time a set of GL commands they |
38 // will create GPUTimer objects. | 38 // will create GPUTimer objects. |
39 // GPUTimer - Once a user decides to time something, the user creates a new | 39 // GPUTimer - Once a user decides to time something, the user creates a new |
40 // GPUTimer object from a GPUTimingClient and issue Start() and Stop() calls | 40 // GPUTimer object from a GPUTimingClient and issue Start() and Stop() calls |
41 // around various GL calls. Once IsAvailable() returns true, the GPU times | 41 // around various GL calls. Once IsAvailable() returns true, the GPU times |
42 // will be available through the various time stamp related functions. | 42 // will be available through the various time stamp related functions. |
43 // The constructor and destructor of this object handles the actual | 43 // The constructor and destructor of this object handles the actual |
44 // creation and deletion of the GL Queries within GL. | 44 // creation and deletion of the GL Queries within GL. |
45 | 45 |
46 namespace gfx { | 46 namespace gl { |
47 | 47 |
48 class GLContextReal; | 48 class GLContextReal; |
49 class GPUTimingClient; | 49 class GPUTimingClient; |
50 class GPUTimingImpl; | 50 class GPUTimingImpl; |
51 class QueryResult; | 51 class QueryResult; |
52 | 52 |
53 class GPUTiming { | 53 class GPUTiming { |
54 public: | 54 public: |
55 enum TimerType { | 55 enum TimerType { |
56 kTimerTypeInvalid = -1, | 56 kTimerTypeInvalid = -1, |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 virtual ~GPUTimingClient(); | 153 virtual ~GPUTimingClient(); |
154 | 154 |
155 GPUTimingImpl* gpu_timing_; | 155 GPUTimingImpl* gpu_timing_; |
156 GPUTiming::TimerType timer_type_ = GPUTiming::kTimerTypeInvalid; | 156 GPUTiming::TimerType timer_type_ = GPUTiming::kTimerTypeInvalid; |
157 uint32_t disjoint_counter_ = 0; | 157 uint32_t disjoint_counter_ = 0; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient); | 159 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient); |
160 }; | 160 }; |
161 | 161 |
162 } // namespace gfx | 162 } // namespace gl |
163 | 163 |
164 #endif // UI_GL_GPU_TIMING_H_ | 164 #endif // UI_GL_GPU_TIMING_H_ |
OLD | NEW |