| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Used to signal a disjoint occurred for disjoint timer queries. | 26 // Used to signal a disjoint occurred for disjoint timer queries. |
| 27 void SetDisjoint(); | 27 void SetDisjoint(); |
| 28 | 28 |
| 29 // GPUTimer fake queries which can be called multiple times. | 29 // GPUTimer fake queries which can be called multiple times. |
| 30 void ExpectGetErrorCalls(MockGLInterface& gl); | 30 void ExpectGetErrorCalls(MockGLInterface& gl); |
| 31 void ExpectDisjointCalls(MockGLInterface& gl); | 31 void ExpectDisjointCalls(MockGLInterface& gl); |
| 32 void ExpectNoDisjointCalls(MockGLInterface& gl); | 32 void ExpectNoDisjointCalls(MockGLInterface& gl); |
| 33 | 33 |
| 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 ExpectGPUTimeStampQuery(MockGLInterface& gl, bool elapsed_query); |
| 35 void ExpectGPUTimerQuery(MockGLInterface& gl, bool elapsed_query); | 36 void ExpectGPUTimerQuery(MockGLInterface& gl, bool elapsed_query); |
| 36 void ExpectOffsetCalculationQuery(MockGLInterface& gl); | 37 void ExpectOffsetCalculationQuery(MockGLInterface& gl); |
| 37 void ExpectNoOffsetCalculationQuery(MockGLInterface& gl); | 38 void ExpectNoOffsetCalculationQuery(MockGLInterface& gl); |
| 38 | 39 |
| 39 // Fake GL Functions. | 40 // Fake GL Functions. |
| 40 void FakeGLGenQueries(GLsizei n, GLuint* ids); | 41 void FakeGLGenQueries(GLsizei n, GLuint* ids); |
| 41 void FakeGLDeleteQueries(GLsizei n, const GLuint* ids); | 42 void FakeGLDeleteQueries(GLsizei n, const GLuint* ids); |
| 42 void FakeGLBeginQuery(GLenum target, GLuint id); | 43 void FakeGLBeginQuery(GLenum target, GLuint id); |
| 43 void FakeGLEndQuery(GLenum target); | 44 void FakeGLEndQuery(GLenum target); |
| 44 void FakeGLGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params); | 45 void FakeGLGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 73 query_id_ = 0; | 74 query_id_ = 0; |
| 74 begin_time_ = 0; | 75 begin_time_ = 0; |
| 75 } | 76 } |
| 76 }; | 77 }; |
| 77 ElapsedQuery current_elapsed_query_; | 78 ElapsedQuery current_elapsed_query_; |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace gfx | 81 } // namespace gfx |
| 81 | 82 |
| 82 #endif // UI_GL_GPU_TIMING_FAKE_H_ | 83 #endif // UI_GL_GPU_TIMING_FAKE_H_ |
| OLD | NEW |