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

Side by Side Diff: ui/gl/gpu_timing.h

Issue 1188013004: Added support for Time Elapsed queries through the command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed extra line Created 5 years, 6 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
OLDNEW
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
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
92 // Start a timer range. 89 // Start a timer range.
93 void Start(); 90 void Start();
94 void End(); 91 void End();
95 92
96 bool IsAvailable(); 93 bool IsAvailable();
97 94
98 void GetStartEndTimestamps(int64* start, int64* end); 95 void GetStartEndTimestamps(int64* start, int64* end);
99 int64 GetDeltaElapsed(); 96 int64 GetDeltaElapsed();
100 97
101 private: 98 private:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 GPUTimingImpl* gpu_timing_; 145 GPUTimingImpl* gpu_timing_;
149 GPUTiming::TimerType timer_type_ = GPUTiming::kTimerTypeInvalid; 146 GPUTiming::TimerType timer_type_ = GPUTiming::kTimerTypeInvalid;
150 uint32_t disjoint_counter_ = 0; 147 uint32_t disjoint_counter_ = 0;
151 148
152 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient); 149 DISALLOW_COPY_AND_ASSIGN(GPUTimingClient);
153 }; 150 };
154 151
155 } // namespace gfx 152 } // namespace gfx
156 153
157 #endif // UI_GL_GPU_TIMING_H_ 154 #endif // UI_GL_GPU_TIMING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698