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 <memory> |
8 #include <queue> | 9 #include <queue> |
9 | 10 |
10 #include "base/callback.h" | 11 #include "base/callback.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "ui/gl/gl_export.h" | 13 #include "ui/gl/gl_export.h" |
13 | 14 |
14 // The gpu_timing classes handles the abstraction of GL GPU Timing extensions | 15 // The gpu_timing classes handles the abstraction of GL GPU Timing extensions |
15 // into a common set of functions. Currently the different timer extensions that | 16 // into a common set of functions. Currently the different timer extensions that |
16 // are supported are EXT_timer_query, ARB_timer_query and | 17 // are supported are EXT_timer_query, ARB_timer_query and |
17 // EXT_disjoint_timer_query. | 18 // EXT_disjoint_timer_query. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 public: | 52 public: |
52 enum TimerType { | 53 enum TimerType { |
53 kTimerTypeInvalid = -1, | 54 kTimerTypeInvalid = -1, |
54 | 55 |
55 kTimerTypeEXT, // EXT_timer_query | 56 kTimerTypeEXT, // EXT_timer_query |
56 kTimerTypeARB, // ARB_timer_query | 57 kTimerTypeARB, // ARB_timer_query |
57 kTimerTypeDisjoint // EXT_disjoint_timer_query | 58 kTimerTypeDisjoint // EXT_disjoint_timer_query |
58 }; | 59 }; |
59 | 60 |
60 protected: | 61 protected: |
61 friend struct base::DefaultDeleter<GPUTiming>; | 62 friend std::default_delete<GPUTiming>; |
62 friend class GLContextReal; | 63 friend class GLContextReal; |
63 | 64 |
64 static GPUTiming* CreateGPUTiming(GLContextReal* context); | 65 static GPUTiming* CreateGPUTiming(GLContextReal* context); |
65 | 66 |
66 GPUTiming(); | 67 GPUTiming(); |
67 virtual ~GPUTiming(); | 68 virtual ~GPUTiming(); |
68 | 69 |
69 virtual scoped_refptr<GPUTimingClient> CreateGPUTimingClient() = 0; | 70 virtual scoped_refptr<GPUTimingClient> CreateGPUTimingClient() = 0; |
70 | 71 |
71 DISALLOW_COPY_AND_ASSIGN(GPUTiming); | 72 DISALLOW_COPY_AND_ASSIGN(GPUTiming); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 GPUTimingImpl* gpu_timing_; | 153 GPUTimingImpl* gpu_timing_; |
153 GPUTiming::TimerType timer_type_ = GPUTiming::kTimerTypeInvalid; | 154 GPUTiming::TimerType timer_type_ = GPUTiming::kTimerTypeInvalid; |
154 uint32_t disjoint_counter_ = 0; | 155 uint32_t disjoint_counter_ = 0; |
155 | 156 |
156 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient); | 157 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient); |
157 }; | 158 }; |
158 | 159 |
159 } // namespace gfx | 160 } // namespace gfx |
160 | 161 |
161 #endif // UI_GL_GPU_TIMING_H_ | 162 #endif // UI_GL_GPU_TIMING_H_ |
OLD | NEW |