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

Unified Diff: ui/gl/gpu_timing.h

Issue 1233233002: Added support for TimeStamp queries using QueryCounterEXT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed GetQueryivEXT test with QueryCounter Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/gpu/mojo_gles2_impl_autogen.cc ('k') | ui/gl/gpu_timing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gpu_timing.h
diff --git a/ui/gl/gpu_timing.h b/ui/gl/gpu_timing.h
index 08f9c0377d484ad676a6fd4ba670f0cf1e07118d..5d72d7cadea0ae1a500f358340aba584107d017b 100644
--- a/ui/gl/gpu_timing.h
+++ b/ui/gl/gpu_timing.h
@@ -43,12 +43,9 @@
namespace gfx {
class GLContextReal;
-class GPUTiming;
class GPUTimingClient;
class GPUTimingImpl;
class QueryResult;
-class TimeElapsedTimerQuery;
-class TimerQuery;
class GPUTiming {
public:
@@ -86,6 +83,12 @@ class GL_EXPORT GPUTimer {
// this object.
void Destroy(bool have_context);
+ // Clears current queries.
+ void Reset();
+
+ // Start an instant timer, start and end will be equal.
+ void QueryTimeStamp();
+
// Start a timer range.
void Start();
void End();
@@ -102,8 +105,12 @@ class GL_EXPORT GPUTimer {
bool use_elapsed_timer);
bool use_elapsed_timer_ = false;
- bool end_requested_ = false;
- bool end_available_ = false;
+ enum TimerState {
+ kTimerState_Ready,
+ kTimerState_WaitingForEnd,
+ kTimerState_WaitingForResult,
+ kTimerState_ResultAvailable
+ } timer_state_ = kTimerState_Ready;
scoped_refptr<GPUTimingClient> gpu_timing_client_;
scoped_refptr<QueryResult> time_stamp_result_;
scoped_refptr<QueryResult> elapsed_timer_result_;
« no previous file with comments | « mojo/gpu/mojo_gles2_impl_autogen.cc ('k') | ui/gl/gpu_timing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698