| 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 <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 class GL_EXPORT GPUTimer { | 79 class GL_EXPORT GPUTimer { |
| 80 public: | 80 public: |
| 81 static void DisableTimestampQueries(); | 81 static void DisableTimestampQueries(); |
| 82 | 82 |
| 83 ~GPUTimer(); | 83 ~GPUTimer(); |
| 84 | 84 |
| 85 // Destroy the timer object. This must be explicitly called before destroying | 85 // Destroy the timer object. This must be explicitly called before destroying |
| 86 // this object. | 86 // this object. |
| 87 void Destroy(bool have_context); | 87 void Destroy(bool have_context); |
| 88 | 88 |
| 89 // Start an instant timer, start and end will be equal. |
| 90 void Instant(); |
| 91 |
| 89 // Start a timer range. | 92 // Start a timer range. |
| 90 void Start(); | 93 void Start(); |
| 91 void End(); | 94 void End(); |
| 92 | 95 |
| 93 bool IsAvailable(); | 96 bool IsAvailable(); |
| 94 | 97 |
| 95 void GetStartEndTimestamps(int64* start, int64* end); | 98 void GetStartEndTimestamps(int64* start, int64* end); |
| 96 int64 GetDeltaElapsed(); | 99 int64 GetDeltaElapsed(); |
| 97 | 100 |
| 98 private: | 101 private: |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 GPUTimingImpl* gpu_timing_; | 148 GPUTimingImpl* gpu_timing_; |
| 146 GPUTiming::TimerType timer_type_ = GPUTiming::kTimerTypeInvalid; | 149 GPUTiming::TimerType timer_type_ = GPUTiming::kTimerTypeInvalid; |
| 147 uint32_t disjoint_counter_ = 0; | 150 uint32_t disjoint_counter_ = 0; |
| 148 | 151 |
| 149 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient); | 152 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient); |
| 150 }; | 153 }; |
| 151 | 154 |
| 152 } // namespace gfx | 155 } // namespace gfx |
| 153 | 156 |
| 154 #endif // UI_GL_GPU_TIMING_H_ | 157 #endif // UI_GL_GPU_TIMING_H_ |
| OLD | NEW |