Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: app/gfx/gl/gl_mock.h

Issue 2134006: Added EGL based GLContext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « app/gfx/gl/gl_interface.cc ('k') | app/surface/accelerated_surface_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 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_SERVICE_GL_MOCK_H_ 8 #ifndef APP_GFX_GL_GL_MOCK_H_
9 #define GPU_COMMAND_BUFFER_SERVICE_GL_MOCK_H_ 9 #define APP_GFX_GL_GL_MOCK_H_
10 10
11 #include "gpu/command_buffer/service/gl_interface.h" 11 #include "app/gfx/gl/gl_interface.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 13
14 namespace gles2 { 14 namespace gfx {
15 15
16 class MockGLInterface : public GLInterface { 16 class MockGLInterface : public GLInterface {
17 public: 17 public:
18 virtual ~MockGLInterface() { 18 virtual ~MockGLInterface() {
19 } 19 }
20 20
21 MOCK_METHOD1(ActiveTexture, void(GLenum texture)); 21 MOCK_METHOD1(ActiveTexture, void(GLenum texture));
22 22
23 MOCK_METHOD2(AttachShader, void(GLuint program, GLuint shader)); 23 MOCK_METHOD2(AttachShader, void(GLuint program, GLuint shader));
24 24
(...skipping 26 matching lines...) Expand all
51 MOCK_METHOD4(BufferSubData, void( 51 MOCK_METHOD4(BufferSubData, void(
52 GLenum target, GLintptr offset, GLsizeiptr size, const void* data)); 52 GLenum target, GLintptr offset, GLsizeiptr size, const void* data));
53 53
54 MOCK_METHOD1(CheckFramebufferStatusEXT, GLenum(GLenum target)); 54 MOCK_METHOD1(CheckFramebufferStatusEXT, GLenum(GLenum target));
55 55
56 MOCK_METHOD1(Clear, void(GLbitfield mask)); 56 MOCK_METHOD1(Clear, void(GLbitfield mask));
57 57
58 MOCK_METHOD4(ClearColor, void( 58 MOCK_METHOD4(ClearColor, void(
59 GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)); 59 GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha));
60 60
61 MOCK_METHOD1(ClearDepth, void(GLclampf depth)); 61 MOCK_METHOD1(ClearDepth, void(GLclampd depth));
62
63 MOCK_METHOD1(ClearDepthf, void(GLclampf depth));
62 64
63 MOCK_METHOD1(ClearStencil, void(GLint s)); 65 MOCK_METHOD1(ClearStencil, void(GLint s));
64 66
65 MOCK_METHOD4(ColorMask, void( 67 MOCK_METHOD4(ColorMask, void(
66 GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)); 68 GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha));
67 69
68 MOCK_METHOD1(CompileShader, void(GLuint shader)); 70 MOCK_METHOD1(CompileShader, void(GLuint shader));
69 71
70 MOCK_METHOD8(CompressedTexImage2D, void( 72 MOCK_METHOD8(CompressedTexImage2D, void(
71 GLenum target, GLint level, GLenum internalformat, GLsizei width, 73 GLenum target, GLint level, GLenum internalformat, GLsizei width,
(...skipping 28 matching lines...) Expand all
100 GLsizei n, const GLuint* renderbuffers)); 102 GLsizei n, const GLuint* renderbuffers));
101 103
102 MOCK_METHOD1(DeleteShader, void(GLuint shader)); 104 MOCK_METHOD1(DeleteShader, void(GLuint shader));
103 105
104 MOCK_METHOD2(DeleteTextures, void(GLsizei n, const GLuint* textures)); 106 MOCK_METHOD2(DeleteTextures, void(GLsizei n, const GLuint* textures));
105 107
106 MOCK_METHOD1(DepthFunc, void(GLenum func)); 108 MOCK_METHOD1(DepthFunc, void(GLenum func));
107 109
108 MOCK_METHOD1(DepthMask, void(GLboolean flag)); 110 MOCK_METHOD1(DepthMask, void(GLboolean flag));
109 111
110 MOCK_METHOD2(DepthRange, void(GLclampf zNear, GLclampf zFar)); 112 MOCK_METHOD2(DepthRange, void(GLclampd zNear, GLclampd zFar));
113
114 MOCK_METHOD2(DepthRangef, void(GLclampf zNear, GLclampf zFar));
111 115
112 MOCK_METHOD2(DetachShader, void(GLuint program, GLuint shader)); 116 MOCK_METHOD2(DetachShader, void(GLuint program, GLuint shader));
113 117
114 MOCK_METHOD1(Disable, void(GLenum cap)); 118 MOCK_METHOD1(Disable, void(GLenum cap));
115 119
116 MOCK_METHOD1(DisableVertexAttribArray, void(GLuint index)); 120 MOCK_METHOD1(DisableVertexAttribArray, void(GLuint index));
117 121
118 MOCK_METHOD3(DrawArrays, void(GLenum mode, GLint first, GLsizei count)); 122 MOCK_METHOD3(DrawArrays, void(GLenum mode, GLint first, GLsizei count));
119 123
120 MOCK_METHOD4(DrawElements, void( 124 MOCK_METHOD4(DrawElements, void(
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 GLsizei stride, const void* ptr)); 378 GLsizei stride, const void* ptr));
375 379
376 MOCK_METHOD4(Viewport, void(GLint x, GLint y, GLsizei width, GLsizei height)); 380 MOCK_METHOD4(Viewport, void(GLint x, GLint y, GLsizei width, GLsizei height));
377 381
378 MOCK_METHOD0(SwapBuffers, void()); 382 MOCK_METHOD0(SwapBuffers, void());
379 383
380 MOCK_METHOD4(GetMaxValueInBuffer, GLuint( 384 MOCK_METHOD4(GetMaxValueInBuffer, GLuint(
381 GLuint buffer_id, GLsizei count, GLenum type, GLuint offset)); 385 GLuint buffer_id, GLsizei count, GLenum type, GLuint offset));
382 }; 386 };
383 387
384 } // namespace gles2 388 } // namespace gfx
385 389
386 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_MOCK_H_ 390 #endif // APP_GFX_GL_GL_MOCK_H_
387 391
388 392
389 393
OLDNEW
« no previous file with comments | « app/gfx/gl/gl_interface.cc ('k') | app/surface/accelerated_surface_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698