Make GL bindings conditional
commite3b17fd533b81a9855a28d04894021479cd6d89d
authorsievers <sievers@chromium.org>
Thu, 29 Jan 2015 04:00:53 +0000 (28 20:00 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 29 Jan 2015 04:01:57 +0000 (29 04:01 +0000)
treed24a55d73711e31fe08c11464baf56a5af11c0cb
parente3bd3d03b895a14e811912a06162efa316668ff9
Make GL bindings conditional

In addition to the extensions also parse GL/GLES version
information from the headers (hence add a few fresh headers).

Instead of brute-forcing binding in somewhat unclear order
make all dynamic bindings very specifically conditional to
the GL version or extension, given the precise name.
If a function is not available, then leave function pointer
set to NULL so it will generate a crash (report).
(Previously it might have ended up as 0
or with whatever valid or not valid pointer GetProcAddr()
returned - i.e. GetProcAddr returning something does not
imply the functionality is there.)

The version also includes whether it is GLES or not which
means we won't look up functions on GLES anymore that are
specific to desktop or vice versa.

Update gpu_unittests so that they are very specific to what
extensions they need (otherwise they might end up calling
the _NotBound fallback).

Also make WGL/GLX/EGL/MESA bindings all happen rightaway since
they don't depend on a context.

BUG=438742,325668

Review URL: https://codereview.chromium.org/871763002

Cr-Commit-Position: refs/heads/master@{#313663}
51 files changed:
gpu/command_buffer/service/feature_info_unittest.cc
gpu/command_buffer/service/framebuffer_manager_unittest.cc
gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
gpu/command_buffer/service/gles2_cmd_decoder_unittest_async_pixel.cc
gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
gpu/command_buffer/service/gpu_service_test.cc
gpu/command_buffer/service/gpu_tracer_unittest.cc
gpu/command_buffer/service/memory_program_cache_unittest.cc
gpu/command_buffer/service/query_manager_unittest.cc
gpu/command_buffer/service/vertex_array_manager_unittest.cc
third_party/khronos/README.chromium
third_party/khronos/noninclude/GL/glext.h [new file with mode: 0644]
third_party/khronos/noninclude/GL/glxext.h [new file with mode: 0644]
third_party/khronos/noninclude/GL/wglext.h [new file with mode: 0644]
ui/gl/BUILD.gn
ui/gl/generate_bindings.py
ui/gl/gl.gyp
ui/gl/gl_bindings.cc [new file with mode: 0644]
ui/gl/gl_bindings.h
ui/gl/gl_bindings_autogen_egl.cc
ui/gl/gl_bindings_autogen_egl.h
ui/gl/gl_bindings_autogen_gl.cc
ui/gl/gl_bindings_autogen_gl.h
ui/gl/gl_bindings_autogen_glx.cc
ui/gl/gl_bindings_autogen_mock.cc
ui/gl/gl_bindings_autogen_mock.h
ui/gl/gl_bindings_autogen_osmesa.cc
ui/gl/gl_bindings_autogen_wgl.cc
ui/gl/gl_egl_api_implementation.cc
ui/gl/gl_egl_api_implementation.h
ui/gl/gl_gl_api_implementation.cc
ui/gl/gl_glx_api_implementation.cc
ui/gl/gl_glx_api_implementation.h
ui/gl/gl_implementation_android.cc
ui/gl/gl_implementation_mac.cc
ui/gl/gl_implementation_ozone.cc
ui/gl/gl_implementation_win.cc
ui/gl/gl_implementation_x11.cc
ui/gl/gl_osmesa_api_implementation.cc
ui/gl/gl_osmesa_api_implementation.h
ui/gl/gl_surface_egl.h
ui/gl/gl_version_info.cc
ui/gl/gl_version_info.h
ui/gl/gl_wgl_api_implementation.cc
ui/gl/gl_wgl_api_implementation.h