| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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_FAKE_H_ | 5 #ifndef UI_GL_GPU_TIMING_FAKE_H_ |
| 6 #define UI_GL_GPU_TIMING_FAKE_H_ | 6 #define UI_GL_GPU_TIMING_FAKE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // GPUTimer fake queries which can only be called once per setup. | 34 // GPUTimer fake queries which can only be called once per setup. |
| 35 void ExpectGPUTimerQuery(MockGLInterface& gl, bool elapsed_query); | 35 void ExpectGPUTimerQuery(MockGLInterface& gl, bool elapsed_query); |
| 36 void ExpectOffsetCalculationQuery(MockGLInterface& gl); | 36 void ExpectOffsetCalculationQuery(MockGLInterface& gl); |
| 37 void ExpectNoOffsetCalculationQuery(MockGLInterface& gl); | 37 void ExpectNoOffsetCalculationQuery(MockGLInterface& gl); |
| 38 | 38 |
| 39 // Fake GL Functions. | 39 // Fake GL Functions. |
| 40 void FakeGLGenQueries(GLsizei n, GLuint* ids); | 40 void FakeGLGenQueries(GLsizei n, GLuint* ids); |
| 41 void FakeGLDeleteQueries(GLsizei n, const GLuint* ids); | 41 void FakeGLDeleteQueries(GLsizei n, const GLuint* ids); |
| 42 void FakeGLBeginQuery(GLenum target, GLuint id); | 42 void FakeGLBeginQuery(GLenum target, GLuint id); |
| 43 void FakeGLEndQuery(GLenum target); | 43 void FakeGLEndQuery(GLenum target); |
| 44 void FakeGLGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params); | 44 void FakeGLGetQueryObjectiv(GLuint id, GLenum pname, GLint* params); |
| 45 void FakeGLQueryCounter(GLuint id, GLenum target); | 45 void FakeGLQueryCounter(GLuint id, GLenum target); |
| 46 void FakeGLGetInteger64v(GLenum pname, GLint64 * data); | 46 void FakeGLGetInteger64v(GLenum pname, GLint64 * data); |
| 47 void FakeGLGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params); | 47 void FakeGLGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params); |
| 48 void FakeGLGetIntegerv(GLenum pname, GLint* params); | 48 void FakeGLGetIntegerv(GLenum pname, GLint* params); |
| 49 GLenum FakeGLGetError(); | 49 GLenum FakeGLGetError(); |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 bool disjointed_ = false; | 52 bool disjointed_ = false; |
| 53 GLint64 current_time_ = 0; | 53 GLint64 current_time_ = 0; |
| 54 GLuint next_query_id_ = 0; | 54 GLuint next_query_id_ = 0; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 73 query_id_ = 0; | 73 query_id_ = 0; |
| 74 begin_time_ = 0; | 74 begin_time_ = 0; |
| 75 } | 75 } |
| 76 }; | 76 }; |
| 77 ElapsedQuery current_elapsed_query_; | 77 ElapsedQuery current_elapsed_query_; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace gfx | 80 } // namespace gfx |
| 81 | 81 |
| 82 #endif // UI_GL_GPU_TIMING_FAKE_H_ | 82 #endif // UI_GL_GPU_TIMING_FAKE_H_ |
| OLD | NEW |