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

Unified Diff: ui/gl/gpu_timing.cc

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 side-by-side diff with in-line comments
Download patch
Index: ui/gl/gpu_timing.cc
diff --git a/ui/gl/gpu_timing.cc b/ui/gl/gpu_timing.cc
index 65110b69cdad388d3636ac0c51b26902a2c32969..c90225434d6fddbcdc42cbe8306ab2ef98186ca2 100644
--- a/ui/gl/gpu_timing.cc
+++ b/ui/gl/gpu_timing.cc
@@ -203,15 +203,13 @@ class TimeElapsedTimerQuery : public TimerQuery {
return false;
}
- GLint done = 0;
- glGetQueryObjectiv(gl_query_id_, GL_QUERY_RESULT_AVAILABLE, &done);
+ GLuint done = 0;
+ glGetQueryObjectuiv(gl_query_id_, GL_QUERY_RESULT_AVAILABLE, &done);
return !!done;
}
// Fills out query result start and end, called after IsAvailable() is true.
void UpdateQueryResults(GPUTimingImpl* gpu_timing) override {
- DCHECK(IsAvailable(gpu_timing));
-
GLuint64 result_value = 0;
glGetQueryObjectui64v(gl_query_id_, GL_QUERY_RESULT, &result_value);
const int64_t micro_results = NanoToMicro(result_value);
@@ -277,8 +275,8 @@ class TimeStampTimerQuery : public TimerQuery {
// Returns true when UpdateQueryResults() is ready to be called.
bool IsAvailable(GPUTimingImpl* gpu_timing) override {
- GLint done = 0;
- glGetQueryObjectiv(gl_query_id_, GL_QUERY_RESULT_AVAILABLE, &done);
+ GLuint done = 0;
+ glGetQueryObjectuiv(gl_query_id_, GL_QUERY_RESULT_AVAILABLE, &done);
return !!done;
}

Powered by Google App Engine
This is Rietveld 408576698