| 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 | |
| 265 MOCK_METHOD2(PixelStorei, void(GLenum pname, GLint param)); | 263 MOCK_METHOD2(PixelStorei, void(GLenum pname, GLint param)); |
| 266 | 264 |
| 267 MOCK_METHOD2(PolygonOffset, void(GLfloat factor, GLfloat units)); | 265 MOCK_METHOD2(PolygonOffset, void(GLfloat factor, GLfloat units)); |
| 268 | 266 |
| 269 MOCK_METHOD7(ReadPixels, void( | 267 MOCK_METHOD7(ReadPixels, void( |
| 270 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, | 268 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, |
| 271 GLenum type, void* pixels)); | 269 GLenum type, void* pixels)); |
| 272 | 270 |
| 273 MOCK_METHOD0(ReleaseShaderCompiler, void()); | 271 MOCK_METHOD0(ReleaseShaderCompiler, void()); |
| 274 | 272 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 const GLfloat* value)); | 369 const GLfloat* value)); |
| 372 | 370 |
| 373 MOCK_METHOD4(UniformMatrix3fv, void( | 371 MOCK_METHOD4(UniformMatrix3fv, void( |
| 374 GLint location, GLsizei count, GLboolean transpose, | 372 GLint location, GLsizei count, GLboolean transpose, |
| 375 const GLfloat* value)); | 373 const GLfloat* value)); |
| 376 | 374 |
| 377 MOCK_METHOD4(UniformMatrix4fv, void( | 375 MOCK_METHOD4(UniformMatrix4fv, void( |
| 378 GLint location, GLsizei count, GLboolean transpose, | 376 GLint location, GLsizei count, GLboolean transpose, |
| 379 const GLfloat* value)); | 377 const GLfloat* value)); |
| 380 | 378 |
| 381 MOCK_METHOD1(UnmapBuffer, GLboolean(GLenum target)); | |
| 382 | |
| 383 MOCK_METHOD1(UseProgram, void(GLuint program)); | 379 MOCK_METHOD1(UseProgram, void(GLuint program)); |
| 384 | 380 |
| 385 MOCK_METHOD1(ValidateProgram, void(GLuint program)); | 381 MOCK_METHOD1(ValidateProgram, void(GLuint program)); |
| 386 | 382 |
| 387 MOCK_METHOD2(VertexAttrib1f, void(GLuint indx, GLfloat x)); | 383 MOCK_METHOD2(VertexAttrib1f, void(GLuint indx, GLfloat x)); |
| 388 | 384 |
| 389 MOCK_METHOD2(VertexAttrib1fv, void(GLuint indx, const GLfloat* values)); | 385 MOCK_METHOD2(VertexAttrib1fv, void(GLuint indx, const GLfloat* values)); |
| 390 | 386 |
| 391 MOCK_METHOD3(VertexAttrib2f, void(GLuint indx, GLfloat x, GLfloat y)); | 387 MOCK_METHOD3(VertexAttrib2f, void(GLuint indx, GLfloat x, GLfloat y)); |
| 392 | 388 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 | 421 |
| 426 MOCK_METHOD1(IsFenceNV, GLboolean(GLuint fence)); | 422 MOCK_METHOD1(IsFenceNV, GLboolean(GLuint fence)); |
| 427 | 423 |
| 428 MOCK_METHOD3(GetFenceivNV, void(GLuint fence, GLenum pname, GLint *params)); | 424 MOCK_METHOD3(GetFenceivNV, void(GLuint fence, GLenum pname, GLint *params)); |
| 429 }; | 425 }; |
| 430 | 426 |
| 431 } // namespace gfx | 427 } // namespace gfx |
| 432 | 428 |
| 433 #endif // GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ | 429 #endif // GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ |
| 434 | 430 |
| OLD | NEW |