OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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. The interface | 5 // This file implements mock GL Interface for unit testing. The interface |
6 // corresponds to the set of functionally distinct GL functions defined in | 6 // corresponds to the set of functionally distinct GL functions defined in |
7 // generate_bindings.py, which may originate from either desktop GL or GLES. | 7 // generate_bindings.py, which may originate from either desktop GL or GLES. |
8 | 8 |
9 #ifndef UI_GL_GL_MOCK_H_ | 9 #ifndef UI_GL_GL_MOCK_H_ |
10 #define UI_GL_GL_MOCK_H_ | 10 #define UI_GL_GL_MOCK_H_ |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 GLint /*x*/, | 50 GLint /*x*/, |
51 GLint /*y*/, | 51 GLint /*y*/, |
52 GLsizei /*width*/, | 52 GLsizei /*width*/, |
53 GLsizei /*height*/, | 53 GLsizei /*height*/, |
54 GLboolean /*unpackFlipY*/, | 54 GLboolean /*unpackFlipY*/, |
55 GLboolean /*unpackPremultiplyAlpha*/, | 55 GLboolean /*unpackPremultiplyAlpha*/, |
56 GLboolean /*unpackUnmultiplyAlpha*/) { | 56 GLboolean /*unpackUnmultiplyAlpha*/) { |
57 NOTREACHED(); | 57 NOTREACHED(); |
58 } | 58 } |
59 | 59 |
| 60 void TexImage3DRobustANGLE(GLenum target, |
| 61 GLint level, |
| 62 GLint internalformat, |
| 63 GLsizei width, |
| 64 GLsizei height, |
| 65 GLsizei depth, |
| 66 GLint border, |
| 67 GLenum format, |
| 68 GLenum type, |
| 69 GLsizei bufSize, |
| 70 const void* pixels) { |
| 71 NOTREACHED(); |
| 72 } |
| 73 |
60 void TexSubImage3D( | 74 void TexSubImage3D( |
61 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, | 75 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, |
62 GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, | 76 GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, |
63 const void* pixels) { | 77 const void* pixels) { |
64 if (pixels == nullptr) { | 78 if (pixels == nullptr) { |
65 TexSubImage3DNoData(target, level, xoffset, yoffset, zoffset, | 79 TexSubImage3DNoData(target, level, xoffset, yoffset, zoffset, |
66 width, height, depth, format, type); | 80 width, height, depth, format, type); |
67 } else { | 81 } else { |
68 NOTREACHED(); | 82 NOTREACHED(); |
69 } | 83 } |
70 } | 84 } |
71 | 85 |
| 86 void TexSubImage3DRobustANGLE(GLenum target, |
| 87 GLint level, |
| 88 GLint xoffset, |
| 89 GLint yoffset, |
| 90 GLint zoffset, |
| 91 GLsizei width, |
| 92 GLsizei height, |
| 93 GLsizei depth, |
| 94 GLenum format, |
| 95 GLenum type, |
| 96 GLsizei bufSize, |
| 97 const void* pixels) { |
| 98 NOTREACHED(); |
| 99 } |
| 100 |
72 MOCK_METHOD10(TexSubImage3DNoData, | 101 MOCK_METHOD10(TexSubImage3DNoData, |
73 void(GLenum target, | 102 void(GLenum target, |
74 GLint level, | 103 GLint level, |
75 GLint xoffset, | 104 GLint xoffset, |
76 GLint yoffset, | 105 GLint yoffset, |
77 GLint zoffset, | 106 GLint zoffset, |
78 GLsizei width, | 107 GLsizei width, |
79 GLsizei height, | 108 GLsizei height, |
80 GLsizei depth, | 109 GLsizei depth, |
81 GLenum format, | 110 GLenum format, |
82 GLenum type)); | 111 GLenum type)); |
83 | 112 |
84 private: | 113 private: |
85 static MockGLInterface* interface_; | 114 static MockGLInterface* interface_; |
86 | 115 |
87 // Static mock functions that invoke the member functions of interface_. | 116 // Static mock functions that invoke the member functions of interface_. |
88 #include "gl_bindings_autogen_mock.h" | 117 #include "gl_bindings_autogen_mock.h" |
89 | 118 |
90 static void GL_BINDING_CALL Mock_glTexSubImage3DNoData( | 119 static void GL_BINDING_CALL Mock_glTexSubImage3DNoData( |
91 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, | 120 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, |
92 GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type); | 121 GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type); |
93 }; | 122 }; |
94 | 123 |
95 } // namespace gl | 124 } // namespace gl |
96 | 125 |
97 #endif // UI_GL_GL_MOCK_H_ | 126 #endif // UI_GL_GL_MOCK_H_ |
OLD | NEW |