| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Used to signal a disjoint occurred for disjoint timer queries. | 31 // Used to signal a disjoint occurred for disjoint timer queries. |
| 32 void SetDisjoint(); | 32 void SetDisjoint(); |
| 33 | 33 |
| 34 // GPUTimer fake queries which can be called multiple times. | 34 // GPUTimer fake queries which can be called multiple times. |
| 35 void ExpectGetErrorCalls(MockGLInterface& gl); | 35 void ExpectGetErrorCalls(MockGLInterface& gl); |
| 36 void ExpectDisjointCalls(MockGLInterface& gl); | 36 void ExpectDisjointCalls(MockGLInterface& gl); |
| 37 void ExpectNoDisjointCalls(MockGLInterface& gl); | 37 void ExpectNoDisjointCalls(MockGLInterface& gl); |
| 38 | 38 |
| 39 // GPUTimer fake queries which can only be called once per setup. | 39 // GPUTimer fake queries which can only be called once per setup. |
| 40 void ExpectGPUTimeStampQuery(MockGLInterface& gl, bool elapsed_query); | 40 void ExpectGPUTimeStampQuery(MockGLInterface& gl, |
| 41 bool elapsed_query, |
| 42 bool query_timestamp_counter_bits); |
| 41 void ExpectGPUTimerQuery(MockGLInterface& gl, bool elapsed_query); | 43 void ExpectGPUTimerQuery(MockGLInterface& gl, bool elapsed_query); |
| 42 void ExpectOffsetCalculationQuery(MockGLInterface& gl); | 44 void ExpectOffsetCalculationQuery(MockGLInterface& gl); |
| 43 void ExpectNoOffsetCalculationQuery(MockGLInterface& gl); | 45 void ExpectNoOffsetCalculationQuery(MockGLInterface& gl); |
| 44 | 46 |
| 45 // Fake GL Functions. | 47 // Fake GL Functions. |
| 46 void FakeGLGenQueries(GLsizei n, GLuint* ids); | 48 void FakeGLGenQueries(GLsizei n, GLuint* ids); |
| 47 void FakeGLDeleteQueries(GLsizei n, const GLuint* ids); | 49 void FakeGLDeleteQueries(GLsizei n, const GLuint* ids); |
| 48 void FakeGLBeginQuery(GLenum target, GLuint id); | 50 void FakeGLBeginQuery(GLenum target, GLuint id); |
| 49 void FakeGLEndQuery(GLenum target); | 51 void FakeGLEndQuery(GLenum target); |
| 50 void FakeGLGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params); | 52 void FakeGLGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 81 query_id_ = 0; | 83 query_id_ = 0; |
| 82 begin_time_ = 0; | 84 begin_time_ = 0; |
| 83 } | 85 } |
| 84 }; | 86 }; |
| 85 ElapsedQuery current_elapsed_query_; | 87 ElapsedQuery current_elapsed_query_; |
| 86 }; | 88 }; |
| 87 | 89 |
| 88 } // namespace gfx | 90 } // namespace gfx |
| 89 | 91 |
| 90 #endif // UI_GL_GPU_TIMING_FAKE_H_ | 92 #endif // UI_GL_GPU_TIMING_FAKE_H_ |
| OLD | NEW |