diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 22:06:15 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 22:06:15 +0000 |
commit | b9363b2794c6f287be68eebb361117cdfbf060ca (patch) | |
tree | 74408c31f3920ae183663b0f16e633349805798e /app/app_base.gypi | |
parent | c8c9712650efaa201c97ad6ff4edb6aa092dfd17 (diff) | |
download | chromium_src-b9363b2794c6f287be68eebb361117cdfbf060ca.zip chromium_src-b9363b2794c6f287be68eebb361117cdfbf060ca.tar.gz chromium_src-b9363b2794c6f287be68eebb361117cdfbf060ca.tar.bz2 |
Added EGL based GLContext.
Python script to generate code to dynamically bind to GL functions (native GL, OSMesa, EGL or mock GL for unit tests). This replaces GLEW because GLEW doesn't bind to the GLES dialect of GL.
Moved the mock GL code into app/gfx/gl.
Updated the GPU code and AcceleratedSurface to use the new GL bindings.
TEST=trybots
BUG=none
Review URL: http://codereview.chromium.org/2134006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49332 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/app_base.gypi')
-rw-r--r-- | app/app_base.gypi | 103 |
1 files changed, 93 insertions, 10 deletions
diff --git a/app/app_base.gypi b/app/app_base.gypi index 4f391c5..247118a 100644 --- a/app/app_base.gypi +++ b/app/app_base.gypi @@ -67,6 +67,7 @@ 'msvs_guid': '4631946D-7D5F-44BD-A5A8-504C0A7033BE', 'variables': { 'app_base_target': 1, + 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/app', }, 'dependencies': [ # app resources and app_strings should be shared with the 64-bit @@ -85,17 +86,17 @@ '../third_party/sqlite/sqlite.gyp:sqlite', '../third_party/zlib/zlib.gyp:zlib', ], - 'defines': [ - 'GLEW_STATIC', - ], 'include_dirs': [ - '../third_party/glew/include', + '../third_party/mesa/MesaLib/include', + '<(gl_binding_output_dir)', ], # TODO(gregoryd): The direct_dependent_settings should be shared with # the 64-bit target, but it doesn't work due to a bug in gyp 'direct_dependent_settings': { 'include_dirs': [ '..', + '../third_party/mesa/MesaLib/include', + '<(gl_binding_output_dir)', ], }, 'sources': [ @@ -123,16 +124,23 @@ 'file_download_interface.h', 'gfx/font_util.h', 'gfx/font_util.cc', + 'gfx/gl/gl_bindings.h', 'gfx/gl/gl_context.cc', 'gfx/gl/gl_context.h', - 'gfx/gl/gl_context_osmesa.cc', - 'gfx/gl/gl_context_osmesa.h', 'gfx/gl/gl_context_linux.cc', - 'gfx/gl/gl_context_linux.h', 'gfx/gl/gl_context_mac.cc', - 'gfx/gl/gl_context_mac.h', + 'gfx/gl/gl_context_osmesa.cc', + 'gfx/gl/gl_context_osmesa.h', + 'gfx/gl/gl_context_stub.h', 'gfx/gl/gl_context_win.cc', - 'gfx/gl/gl_context_win.h', + 'gfx/gl/gl_headers.h', + 'gfx/gl/gl_implementation.h', + 'gfx/gl/gl_implementation_linux.cc', + 'gfx/gl/gl_implementation_mac.cc', + 'gfx/gl/gl_implementation_win.cc', + 'gfx/gl/gl_interface.h', + 'gfx/gl/gl_interface.cc', + 'gfx/gl/gl_mock.h', 'gtk_dnd_util.cc', 'gtk_dnd_util.h', 'gtk_signal.cc', @@ -203,7 +211,42 @@ 'x11_util.cc', 'x11_util.h', 'x11_util_internal.h', - '../third_party/glew/src/glew.c', + '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h', + '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h', + ], + # hard_dependency is necessary for this target because it has actions + # that generate header files included by dependent targtets. The header + # files must be generated before the dependents are compiled. The usual + # semantics are to allow the two targets to build concurrently. + 'hard_dependency': 1, + 'actions': [ + { + 'action_name': 'generate_gl_bindings', + 'inputs': [ + 'gfx/gl/generate_bindings.py', + ], + 'outputs': [ + '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h', + '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h', + '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h', + '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h', + '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h', + ], + 'action': [ + 'python', + 'gfx/gl/generate_bindings.py', + '<(gl_binding_output_dir)', + ], + }, ], 'conditions': [ ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { @@ -255,6 +298,46 @@ 'win/window_impl.h', ], }], + ['OS=="linux"', { + 'sources': [ + '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h', + ], + 'all_dependent_settings': { + 'defines': [ + 'GL_GLEXT_PROTOTYPES', + ], + 'ldflags': [ + '-L<(PRODUCT_DIR)', + ], + 'link_settings': { + 'libraries': [ + '-lX11', + '-ldl', + ], + }, + }, + }], + ['OS=="mac"', { + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', + ], + }, + }], + ['OS=="win"', { + 'include_dirs': [ + '../third_party/angle/include', + ], + 'sources': [ + 'gfx/gl/gl_context_egl.cc', + 'gfx/gl/gl_context_egl.h', + '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h', + '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc', + '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h', + ], + }], ], }, ], |