| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 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 collections | 10 import collections |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 ['EGLDisplay', ['eglGetCurrentDisplay'], 'void'], | 356 ['EGLDisplay', ['eglGetCurrentDisplay'], 'void'], |
| 357 ['EGLBoolean', ['eglQueryContext'], | 357 ['EGLBoolean', ['eglQueryContext'], |
| 358 'EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value'], | 358 'EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value'], |
| 359 ['EGLBoolean', ['eglWaitGL'], 'void'], | 359 ['EGLBoolean', ['eglWaitGL'], 'void'], |
| 360 ['EGLBoolean', ['eglWaitNative'], 'EGLint engine'], | 360 ['EGLBoolean', ['eglWaitNative'], 'EGLint engine'], |
| 361 ['EGLBoolean', ['eglSwapBuffers'], 'EGLDisplay dpy, EGLSurface surface'], | 361 ['EGLBoolean', ['eglSwapBuffers'], 'EGLDisplay dpy, EGLSurface surface'], |
| 362 ['EGLBoolean', ['eglCopyBuffers'], | 362 ['EGLBoolean', ['eglCopyBuffers'], |
| 363 'EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target'], | 363 'EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target'], |
| 364 ['__eglMustCastToProperFunctionPointerType', ['eglGetProcAddress'], | 364 ['__eglMustCastToProperFunctionPointerType', ['eglGetProcAddress'], |
| 365 'const char* procname'], | 365 'const char* procname'], |
| 366 ['EGLBoolean', ['eglPostSubBufferNV'], |
| 367 'EGLDisplay dpy, EGLSurface surface, ' |
| 368 'EGLint x, EGLint y, EGLint width, EGLint height'], |
| 366 ['EGLBoolean', ['eglQuerySurfacePointerANGLE'], | 369 ['EGLBoolean', ['eglQuerySurfacePointerANGLE'], |
| 367 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value'], | 370 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value'], |
| 368 ] | 371 ] |
| 369 | 372 |
| 370 WGL_FUNCTIONS = [ | 373 WGL_FUNCTIONS = [ |
| 371 ['HGLRC', ['wglCreateContext'], 'HDC hdc'], | 374 ['HGLRC', ['wglCreateContext'], 'HDC hdc'], |
| 372 ['HGLRC', ['wglCreateLayerContext'], 'HDC hdc, int iLayerPlane'], | 375 ['HGLRC', ['wglCreateLayerContext'], 'HDC hdc, int iLayerPlane'], |
| 373 ['BOOL', ['wglCopyContext'], 'HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask'], | 376 ['BOOL', ['wglCopyContext'], 'HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask'], |
| 374 ['BOOL', ['wglDeleteContext'], 'HGLRC hglrc'], | 377 ['BOOL', ['wglDeleteContext'], 'HGLRC hglrc'], |
| 375 ['HGLRC', ['wglGetCurrentContext'], ''], | 378 ['HGLRC', ['wglGetCurrentContext'], ''], |
| (...skipping 13 matching lines...) Expand all Loading... |
| 389 ['HDC', ['wglGetPbufferDCARB'], 'HPBUFFERARB hPbuffer'], | 392 ['HDC', ['wglGetPbufferDCARB'], 'HPBUFFERARB hPbuffer'], |
| 390 ['int', ['wglReleasePbufferDCARB'], 'HPBUFFERARB hPbuffer, HDC hDC'], | 393 ['int', ['wglReleasePbufferDCARB'], 'HPBUFFERARB hPbuffer, HDC hDC'], |
| 391 ['BOOL', ['wglDestroyPbufferARB'], 'HPBUFFERARB hPbuffer'], | 394 ['BOOL', ['wglDestroyPbufferARB'], 'HPBUFFERARB hPbuffer'], |
| 392 ['BOOL', ['wglQueryPbufferARB'], | 395 ['BOOL', ['wglQueryPbufferARB'], |
| 393 'HPBUFFERARB hPbuffer, int iAttribute, int* piValue'], | 396 'HPBUFFERARB hPbuffer, int iAttribute, int* piValue'], |
| 394 ] | 397 ] |
| 395 | 398 |
| 396 GLX_FUNCTIONS = [ | 399 GLX_FUNCTIONS = [ |
| 397 ['XVisualInfo*', ['glXChooseVisual'], | 400 ['XVisualInfo*', ['glXChooseVisual'], |
| 398 'Display* dpy, int screen, int* attribList'], | 401 'Display* dpy, int screen, int* attribList'], |
| 402 ['void', ['glXCopySubBufferMESA'], |
| 403 'Display* dpy, GLXDrawable drawable, ' |
| 404 'int x, int y, int width, int height'], |
| 399 ['GLXContext', ['glXCreateContext'], | 405 ['GLXContext', ['glXCreateContext'], |
| 400 'Display* dpy, XVisualInfo* vis, GLXContext shareList, int direct'], | 406 'Display* dpy, XVisualInfo* vis, GLXContext shareList, int direct'], |
| 401 ['void', ['glXBindTexImageEXT'], | 407 ['void', ['glXBindTexImageEXT'], |
| 402 'Display* dpy, GLXDrawable drawable, int buffer, int* attribList'], | 408 'Display* dpy, GLXDrawable drawable, int buffer, int* attribList'], |
| 403 ['void', ['glXReleaseTexImageEXT'], | 409 ['void', ['glXReleaseTexImageEXT'], |
| 404 'Display* dpy, GLXDrawable drawable, int buffer'], | 410 'Display* dpy, GLXDrawable drawable, int buffer'], |
| 405 ['void', ['glXDestroyContext'], 'Display* dpy, GLXContext ctx'], | 411 ['void', ['glXDestroyContext'], 'Display* dpy, GLXContext ctx'], |
| 406 ['int', ['glXMakeCurrent'], | 412 ['int', ['glXMakeCurrent'], |
| 407 'Display* dpy, GLXDrawable drawable, GLXContext ctx'], | 413 'Display* dpy, GLXDrawable drawable, GLXContext ctx'], |
| 408 ['void', ['glXCopyContext'], | 414 ['void', ['glXCopyContext'], |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 GenerateSource(source_file, functions, set_name, used_extension_functions) | 885 GenerateSource(source_file, functions, set_name, used_extension_functions) |
| 880 source_file.close() | 886 source_file.close() |
| 881 | 887 |
| 882 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') | 888 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') |
| 883 GenerateMockSource(source_file, GL_FUNCTIONS) | 889 GenerateMockSource(source_file, GL_FUNCTIONS) |
| 884 source_file.close() | 890 source_file.close() |
| 885 | 891 |
| 886 | 892 |
| 887 if __name__ == '__main__': | 893 if __name__ == '__main__': |
| 888 main(sys.argv[1:]) | 894 main(sys.argv[1:]) |
| OLD | NEW |