OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This file implements mock GL Interface for unit testing. It has to mock | 5 // This file implements mock GL Interface for unit testing. It has to mock |
6 // Desktop GL, not GLES2 as it is used to test the service side code. | 6 // Desktop GL, not GLES2 as it is used to test the service side code. |
7 | 7 |
8 #ifndef GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ | 8 #ifndef GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ |
9 #define GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ | 9 #define GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 MOCK_METHOD1(IsRenderbufferEXT, GLboolean(GLuint renderbuffer)); | 253 MOCK_METHOD1(IsRenderbufferEXT, GLboolean(GLuint renderbuffer)); |
254 | 254 |
255 MOCK_METHOD1(IsShader, GLboolean(GLuint shader)); | 255 MOCK_METHOD1(IsShader, GLboolean(GLuint shader)); |
256 | 256 |
257 MOCK_METHOD1(IsTexture, GLboolean(GLuint texture)); | 257 MOCK_METHOD1(IsTexture, GLboolean(GLuint texture)); |
258 | 258 |
259 MOCK_METHOD1(LineWidth, void(GLfloat width)); | 259 MOCK_METHOD1(LineWidth, void(GLfloat width)); |
260 | 260 |
261 MOCK_METHOD1(LinkProgram, void(GLuint program)); | 261 MOCK_METHOD1(LinkProgram, void(GLuint program)); |
262 | 262 |
| 263 MOCK_METHOD2(MapBuffer, void*(GLenum target, GLenum access)); |
| 264 |
263 MOCK_METHOD2(PixelStorei, void(GLenum pname, GLint param)); | 265 MOCK_METHOD2(PixelStorei, void(GLenum pname, GLint param)); |
264 | 266 |
265 MOCK_METHOD2(PolygonOffset, void(GLfloat factor, GLfloat units)); | 267 MOCK_METHOD2(PolygonOffset, void(GLfloat factor, GLfloat units)); |
266 | 268 |
267 MOCK_METHOD7(ReadPixels, void( | 269 MOCK_METHOD7(ReadPixels, void( |
268 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, | 270 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, |
269 GLenum type, void* pixels)); | 271 GLenum type, void* pixels)); |
270 | 272 |
271 MOCK_METHOD0(ReleaseShaderCompiler, void()); | 273 MOCK_METHOD0(ReleaseShaderCompiler, void()); |
272 | 274 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 const GLfloat* value)); | 371 const GLfloat* value)); |
370 | 372 |
371 MOCK_METHOD4(UniformMatrix3fv, void( | 373 MOCK_METHOD4(UniformMatrix3fv, void( |
372 GLint location, GLsizei count, GLboolean transpose, | 374 GLint location, GLsizei count, GLboolean transpose, |
373 const GLfloat* value)); | 375 const GLfloat* value)); |
374 | 376 |
375 MOCK_METHOD4(UniformMatrix4fv, void( | 377 MOCK_METHOD4(UniformMatrix4fv, void( |
376 GLint location, GLsizei count, GLboolean transpose, | 378 GLint location, GLsizei count, GLboolean transpose, |
377 const GLfloat* value)); | 379 const GLfloat* value)); |
378 | 380 |
| 381 MOCK_METHOD1(UnmapBuffer, GLboolean(GLenum target)); |
| 382 |
379 MOCK_METHOD1(UseProgram, void(GLuint program)); | 383 MOCK_METHOD1(UseProgram, void(GLuint program)); |
380 | 384 |
381 MOCK_METHOD1(ValidateProgram, void(GLuint program)); | 385 MOCK_METHOD1(ValidateProgram, void(GLuint program)); |
382 | 386 |
383 MOCK_METHOD2(VertexAttrib1f, void(GLuint indx, GLfloat x)); | 387 MOCK_METHOD2(VertexAttrib1f, void(GLuint indx, GLfloat x)); |
384 | 388 |
385 MOCK_METHOD2(VertexAttrib1fv, void(GLuint indx, const GLfloat* values)); | 389 MOCK_METHOD2(VertexAttrib1fv, void(GLuint indx, const GLfloat* values)); |
386 | 390 |
387 MOCK_METHOD3(VertexAttrib2f, void(GLuint indx, GLfloat x, GLfloat y)); | 391 MOCK_METHOD3(VertexAttrib2f, void(GLuint indx, GLfloat x, GLfloat y)); |
388 | 392 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 425 |
422 MOCK_METHOD1(IsFenceNV, GLboolean(GLuint fence)); | 426 MOCK_METHOD1(IsFenceNV, GLboolean(GLuint fence)); |
423 | 427 |
424 MOCK_METHOD3(GetFenceivNV, void(GLuint fence, GLenum pname, GLint *params)); | 428 MOCK_METHOD3(GetFenceivNV, void(GLuint fence, GLenum pname, GLint *params)); |
425 }; | 429 }; |
426 | 430 |
427 } // namespace gfx | 431 } // namespace gfx |
428 | 432 |
429 #endif // GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ | 433 #endif // GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ |
430 | 434 |
OLD | NEW |