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

Side by Side Diff: app/gfx/gl/generate_bindings.py

Issue 6677105: Redirect Skia/Ganesh GL calls to Mesa during the layout tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add GL mock functions. Created 9 years, 9 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/app_base.gypi ('k') | app/gfx/gl/gl_bindings_skia.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 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """code generator for GL/GLES extension wrangler.""" 7 """code generator for GL/GLES extension wrangler."""
8 8
9 import os 9 import os
10 import re 10 import re
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 ['GLboolean', ['glIsEnabled'], 'GLenum cap'], 153 ['GLboolean', ['glIsEnabled'], 'GLenum cap'],
154 ['GLboolean', ['glIsFramebufferEXT', 'glIsFramebuffer'], 154 ['GLboolean', ['glIsFramebufferEXT', 'glIsFramebuffer'],
155 'GLuint framebuffer'], 155 'GLuint framebuffer'],
156 ['GLboolean', ['glIsProgram'], 'GLuint program'], 156 ['GLboolean', ['glIsProgram'], 'GLuint program'],
157 ['GLboolean', ['glIsRenderbufferEXT', 'glIsRenderbuffer'], 157 ['GLboolean', ['glIsRenderbufferEXT', 'glIsRenderbuffer'],
158 'GLuint renderbuffer'], 158 'GLuint renderbuffer'],
159 ['GLboolean', ['glIsShader'], 'GLuint shader'], 159 ['GLboolean', ['glIsShader'], 'GLuint shader'],
160 ['GLboolean', ['glIsTexture'], 'GLuint texture'], 160 ['GLboolean', ['glIsTexture'], 'GLuint texture'],
161 ['void', ['glLineWidth'], 'GLfloat width'], 161 ['void', ['glLineWidth'], 'GLfloat width'],
162 ['void', ['glLinkProgram'], 'GLuint program'], 162 ['void', ['glLinkProgram'], 'GLuint program'],
163 ['void*', ['glMapBuffer'], 'GLenum target, GLenum access'],
163 ['void', ['glPixelStorei'], 'GLenum pname, GLint param'], 164 ['void', ['glPixelStorei'], 'GLenum pname, GLint param'],
164 ['void', ['glPolygonOffset'], 'GLfloat factor, GLfloat units'], 165 ['void', ['glPolygonOffset'], 'GLfloat factor, GLfloat units'],
165 ['void', ['glReadPixels'], 166 ['void', ['glReadPixels'],
166 'GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, ' 167 'GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, '
167 'GLenum type, void* pixels'], 168 'GLenum type, void* pixels'],
168 ['void', ['glReleaseShaderCompiler'], 'void'], 169 ['void', ['glReleaseShaderCompiler'], 'void'],
169 ['void', ['glRenderbufferStorageMultisampleEXT', 170 ['void', ['glRenderbufferStorageMultisampleEXT',
170 'glRenderbufferStorageMultisample'], 171 'glRenderbufferStorageMultisample'],
171 'GLenum target, GLsizei samples, GLenum internalformat, ' 172 'GLenum target, GLsizei samples, GLenum internalformat, '
172 'GLsizei width, GLsizei height'], 173 'GLsizei width, GLsizei height'],
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 'GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w'], 221 'GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w'],
221 ['void', ['glUniform4fv'], 'GLint location, GLsizei count, const GLfloat* v'], 222 ['void', ['glUniform4fv'], 'GLint location, GLsizei count, const GLfloat* v'],
222 ['void', ['glUniform4i'], 'GLint location, GLint x, GLint y, GLint z, GLint w'], 223 ['void', ['glUniform4i'], 'GLint location, GLint x, GLint y, GLint z, GLint w'],
223 ['void', ['glUniform4iv'], 'GLint location, GLsizei count, const GLint* v'], 224 ['void', ['glUniform4iv'], 'GLint location, GLsizei count, const GLint* v'],
224 ['void', ['glUniformMatrix2fv'], 225 ['void', ['glUniformMatrix2fv'],
225 'GLint location, GLsizei count, GLboolean transpose, const GLfloat* value'], 226 'GLint location, GLsizei count, GLboolean transpose, const GLfloat* value'],
226 ['void', ['glUniformMatrix3fv'], 227 ['void', ['glUniformMatrix3fv'],
227 'GLint location, GLsizei count, GLboolean transpose, const GLfloat* value'], 228 'GLint location, GLsizei count, GLboolean transpose, const GLfloat* value'],
228 ['void', ['glUniformMatrix4fv'], 229 ['void', ['glUniformMatrix4fv'],
229 'GLint location, GLsizei count, GLboolean transpose, const GLfloat* value'], 230 'GLint location, GLsizei count, GLboolean transpose, const GLfloat* value'],
231 ['GLboolean', ['glUnmapBuffer'], 'GLenum target'],
230 ['void', ['glUseProgram'], 'GLuint program'], 232 ['void', ['glUseProgram'], 'GLuint program'],
231 ['void', ['glValidateProgram'], 'GLuint program'], 233 ['void', ['glValidateProgram'], 'GLuint program'],
232 ['void', ['glVertexAttrib1f'], 'GLuint indx, GLfloat x'], 234 ['void', ['glVertexAttrib1f'], 'GLuint indx, GLfloat x'],
233 ['void', ['glVertexAttrib1fv'], 'GLuint indx, const GLfloat* values'], 235 ['void', ['glVertexAttrib1fv'], 'GLuint indx, const GLfloat* values'],
234 ['void', ['glVertexAttrib2f'], 'GLuint indx, GLfloat x, GLfloat y'], 236 ['void', ['glVertexAttrib2f'], 'GLuint indx, GLfloat x, GLfloat y'],
235 ['void', ['glVertexAttrib2fv'], 'GLuint indx, const GLfloat* values'], 237 ['void', ['glVertexAttrib2fv'], 'GLuint indx, const GLfloat* values'],
236 ['void', ['glVertexAttrib3f'], 'GLuint indx, GLfloat x, GLfloat y, GLfloat z'], 238 ['void', ['glVertexAttrib3f'], 'GLuint indx, GLfloat x, GLfloat y, GLfloat z'],
237 ['void', ['glVertexAttrib3fv'], 'GLuint indx, const GLfloat* values'], 239 ['void', ['glVertexAttrib3fv'], 'GLuint indx, const GLfloat* values'],
238 ['void', ['glVertexAttrib4f'], 240 ['void', ['glVertexAttrib4f'],
239 'GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w'], 241 'GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w'],
240 ['void', ['glVertexAttrib4fv'], 'GLuint indx, const GLfloat* values'], 242 ['void', ['glVertexAttrib4fv'], 'GLuint indx, const GLfloat* values'],
241 ['void', ['glVertexAttribPointer'], 243 ['void', ['glVertexAttribPointer'],
242 'GLuint indx, GLint size, GLenum type, GLboolean normalized, ' 244 'GLuint indx, GLint size, GLenum type, GLboolean normalized, '
243 'GLsizei stride, const void* ptr'], 245 'GLsizei stride, const void* ptr'],
244 ['void', ['glViewport'], 'GLint x, GLint y, GLsizei width, GLsizei height'], 246 ['void', ['glViewport'], 'GLint x, GLint y, GLsizei width, GLsizei height'],
245 ['void', ['glGenFencesNV'], 'GLsizei n, GLuint* fences'], 247 ['void', ['glGenFencesNV'], 'GLsizei n, GLuint* fences'],
246 ['void', ['glDeleteFencesNV'], 'GLsizei n, const GLuint* fences'], 248 ['void', ['glDeleteFencesNV'], 'GLsizei n, const GLuint* fences'],
247 ['void', ['glSetFenceNV'], 'GLuint fence, GLenum condition'], 249 ['void', ['glSetFenceNV'], 'GLuint fence, GLenum condition'],
248 ['GLboolean', ['glTestFenceNV'], 'GLuint fence'], 250 ['GLboolean', ['glTestFenceNV'], 'GLuint fence'],
249 ['void', ['glFinishFenceNV'], 'GLuint fence'], 251 ['void', ['glFinishFenceNV'], 'GLuint fence'],
250 ['GLboolean', ['glIsFenceNV'], 'GLuint fence'], 252 ['GLboolean', ['glIsFenceNV'], 'GLuint fence'],
251 ['void', ['glGetFenceivNV'], 'GLuint fence, GLenum pname, GLint* params'], 253 ['void', ['glGetFenceivNV'], 'GLuint fence, GLenum pname, GLint* params']
252 ] 254 ]
253 255
254 OSMESA_FUNCTIONS = [ 256 OSMESA_FUNCTIONS = [
255 ['OSMesaContext', ['OSMesaCreateContext'], 257 ['OSMesaContext', ['OSMesaCreateContext'],
256 'GLenum format, OSMesaContext sharelist'], 258 'GLenum format, OSMesaContext sharelist'],
257 ['OSMesaContext', ['OSMesaCreateContextExt'], 259 ['OSMesaContext', ['OSMesaCreateContextExt'],
258 'GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, ' 260 'GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, '
259 'OSMesaContext sharelist'], 261 'OSMesaContext sharelist'],
260 ['void', ['OSMesaDestroyContext'], 'OSMesaContext ctx'], 262 ['void', ['OSMesaDestroyContext'], 'OSMesaContext ctx'],
261 ['GLboolean', ['OSMesaMakeCurrent'], 263 ['GLboolean', ['OSMesaMakeCurrent'],
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 GenerateSource(source_file, functions, set_name) 629 GenerateSource(source_file, functions, set_name)
628 source_file.close() 630 source_file.close()
629 631
630 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') 632 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb')
631 GenerateMockSource(source_file, GL_FUNCTIONS) 633 GenerateMockSource(source_file, GL_FUNCTIONS)
632 source_file.close() 634 source_file.close()
633 635
634 636
635 if __name__ == '__main__': 637 if __name__ == '__main__':
636 main(sys.argv[1:]) 638 main(sys.argv[1:])
OLDNEW
« no previous file with comments | « app/app_base.gypi ('k') | app/gfx/gl/gl_bindings_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698