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

Unified Diff: ui/gfx/gl/generate_bindings.py

Issue 8913015: Win: only use transport surface if EGL_ANGLE_d3d_share_handle_client_buffer is advertised. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/image_transport_surface_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/generate_bindings.py
===================================================================
--- ui/gfx/gl/generate_bindings.py (revision 114452)
+++ ui/gfx/gl/generate_bindings.py (working copy)
@@ -1002,16 +1002,19 @@
FUNCTION_SETS = [
[GL_FUNCTIONS, 'gl', ['../../../third_party/mesa/MesaLib/include/GL/glext.h',
- '../../../third_party/khronos/GLES2/gl2ext.h']],
- [OSMESA_FUNCTIONS, 'osmesa', []],
- [EGL_FUNCTIONS, 'egl', ['../../../third_party/khronos/EGL/eglext.h']],
+ '../../../third_party/khronos/GLES2/gl2ext.h'], []],
+ [OSMESA_FUNCTIONS, 'osmesa', [], []],
+ [EGL_FUNCTIONS, 'egl', ['../../../third_party/khronos/EGL/eglext.h'],
+ [
+ 'EGL_ANGLE_d3d_share_handle_client_buffer',
+ ],
+ ],
[WGL_FUNCTIONS, 'wgl', [
- '../../../third_party/mesa/MesaLib/include/GL/wglext.h']],
+ '../../../third_party/mesa/MesaLib/include/GL/wglext.h'], []],
[GLX_FUNCTIONS, 'glx', [
- '../../../third_party/mesa/MesaLib/include/GL/glxext.h']],
+ '../../../third_party/mesa/MesaLib/include/GL/glxext.h'], []],
]
-
def GenerateHeader(file, functions, set_name, used_extension_functions):
"""Generates gl_binding_autogen_x.h"""
@@ -1378,7 +1381,7 @@
return vendor is not None and not vendor.group(1) in ['GL', 'API', 'DC']
-def GetUsedExtensionFunctions(functions, extension_headers):
+def GetUsedExtensionFunctions(functions, extension_headers, extra_extensions):
"""Determine which functions belong to extensions.
Args:
@@ -1405,6 +1408,10 @@
extension = functions_to_extensions[name]
used_extension_functions[extension].append((func['names'][0], name))
+ # Add extensions that do not have any functions.
+ used_extension_functions.update(dict(
+ [(e, []) for e in extra_extensions if e not in used_extension_functions]))
+
def ExtensionSortKey(name):
# Prefer ratified extensions and EXTs.
preferences = ['_ARB_', '_OES_', '_EXT_', '']
@@ -1424,9 +1431,9 @@
else:
dir = '.'
- for [functions, set_name, extension_headers] in FUNCTION_SETS:
+ for [functions, set_name, extension_headers, extensions] in FUNCTION_SETS:
used_extension_functions = GetUsedExtensionFunctions(
- functions, extension_headers)
+ functions, extension_headers, extensions)
header_file = open(
os.path.join(dir, 'gl_bindings_autogen_%s.h' % set_name), 'wb')
« no previous file with comments | « content/common/gpu/image_transport_surface_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698