1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
13 'type': '<(component)',
14 'product_name': 'gl_wrapper', # Avoid colliding with OS X's libGL.dylib
16 '<(DEPTH)/base/base.gyp:base',
17 '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
18 '<(DEPTH)/gpu/command_buffer/command_buffer.gyp:gles2_utils',
19 '<(DEPTH)/skia/skia.gyp:skia',
20 '<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers',
21 '<(DEPTH)/ui/ui.gyp:ui',
24 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
30 '<(DEPTH)/third_party/swiftshader/include',
31 '<(DEPTH)/third_party/mesa/src/include',
32 '<(gl_binding_output_dir)',
34 'direct_dependent_settings': {
36 '<(gl_binding_output_dir)',
39 'export_dependent_settings': [
40 '<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers',
43 'android/gl_jni_registrar.cc',
44 'android/gl_jni_registrar.h',
45 'android/scoped_java_surface.cc',
46 'android/scoped_java_surface.h',
47 'android/surface_texture_bridge.cc',
48 'android/surface_texture_bridge.h',
49 'android/surface_texture_listener.cc',
50 'android/surface_texture_listener.h',
52 'gl_bindings_skia_in_process.cc',
53 'gl_bindings_skia_in_process.h',
56 'gl_context_android.cc',
58 'gl_context_ozone.cc',
59 'gl_context_osmesa.cc',
60 'gl_context_osmesa.h',
68 'gl_gl_api_implementation.cc',
69 'gl_gl_api_implementation.h',
72 'gl_image_android.cc',
81 'gl_implementation.cc',
82 'gl_implementation.h',
83 'gl_implementation_android.cc',
84 'gl_implementation_linux.cc',
85 'gl_implementation_linux.h',
86 'gl_implementation_ozone.cc',
87 'gl_implementation_mac.cc',
88 'gl_implementation_win.cc',
89 'gl_implementation_x11.cc',
92 'gl_osmesa_api_implementation.cc',
93 'gl_osmesa_api_implementation.h',
96 'gl_state_restorer.cc',
97 'gl_state_restorer.h',
101 'gl_surface_stub.cc',
105 'gl_surface_osmesa.cc',
106 'gl_surface_osmesa.h',
109 'gpu_switching_manager.cc',
110 'gpu_switching_manager.h',
111 'io_surface_support_mac.cc',
112 'io_surface_support_mac.h',
115 'scoped_make_current.cc',
116 'scoped_make_current.h',
119 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
120 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
121 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
122 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
123 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
124 '<(gl_binding_output_dir)/gl_interface_autogen_gl.h',
126 # hard_dependency is necessary for this target because it has actions
127 # that generate header files included by dependent targets. The header
128 # files must be generated before the dependents are compiled. The usual
129 # semantics are to allow the two targets to build concurrently.
130 'hard_dependency': 1,
133 'action_name': 'generate_gl_bindings',
135 'generator_path': 'generate_bindings.py',
136 'header_paths': '../../third_party/mesa/src/include:../../third_party/khronos',
140 '<!@(python <(generator_path) --header-paths=<(header_paths) --inputs)',
143 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
144 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
145 '<(gl_binding_output_dir)/gl_bindings_api_autogen_egl.h',
146 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
147 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
148 '<(gl_binding_output_dir)/gl_bindings_api_autogen_gl.h',
149 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
150 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
151 '<(gl_binding_output_dir)/gl_bindings_api_autogen_glx.h',
152 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
153 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
154 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
155 '<(gl_binding_output_dir)/gl_bindings_api_autogen_osmesa.h',
156 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
157 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
158 '<(gl_binding_output_dir)/gl_bindings_api_autogen_wgl.h',
159 '<(gl_binding_output_dir)/gl_interface_autogen_egl.h',
160 '<(gl_binding_output_dir)/gl_interface_autogen_gl.h',
161 '<(gl_binding_output_dir)/gl_interface_autogen_glx.h',
162 '<(gl_binding_output_dir)/gl_interface_autogen_osmesa.h',
163 '<(gl_binding_output_dir)/gl_interface_autogen_wgl.h',
164 '<(gl_binding_output_dir)/gl_mock_autogen_egl.h',
165 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
166 '<(gl_binding_output_dir)/gl_mock_autogen_glx.h',
167 '<(gl_binding_output_dir)/gl_mock_autogen_osmesa.h',
168 '<(gl_binding_output_dir)/gl_mock_autogen_wgl.h',
173 '--header-paths=<(header_paths)',
174 '<(gl_binding_output_dir)',
179 ['OS in ("win", "android", "linux")', {
187 'gl_egl_api_implementation.cc',
188 'gl_egl_api_implementation.h',
189 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
190 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
193 '<(DEPTH)/third_party/khronos',
200 'gl_glx_api_implementation.cc',
201 'gl_glx_api_implementation.h',
206 'gl_egl_api_implementation.cc',
207 'gl_egl_api_implementation.h',
208 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
209 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
211 'all_dependent_settings': {
213 'GL_GLEXT_PROTOTYPES',
227 'gl_egl_api_implementation.cc',
228 'gl_egl_api_implementation.h',
231 'gl_wgl_api_implementation.cc',
232 'gl_wgl_api_implementation.h',
233 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
234 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
246 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
250 ['OS=="mac" and use_aura == 1', {
252 'gl_context_nsview.mm',
253 'gl_context_nsview.h',
254 'gl_surface_nsview.mm',
255 'gl_surface_nsview.h',
272 'gl_context_osmesa.cc',
273 'system_monitor_posix.cc',
276 'GL_GLEXT_PROTOTYPES',
277 'EGL_EGLEXT_PROTOTYPES',
281 'sources/': [ ['exclude', '^android/'] ],
286 'target_name': 'gl_unittest_utils',
287 'type': 'static_library',
289 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
292 '../../testing/gmock.gyp:gmock',
293 '../../third_party/khronos/khronos.gyp:khronos_headers',
297 '<(gl_binding_output_dir)',
300 'direct_dependent_settings': {
302 '<(gl_binding_output_dir)',
308 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
316 'target_name': 'surface_texture_jni_headers',
319 'jni_gen_package': 'ui/gl',
320 'input_java_class': 'android/graphics/SurfaceTexture.class',
322 'includes': [ '../../build/jar_file_jni_generator.gypi' ],
325 'target_name': 'surface_jni_headers',
328 'jni_gen_package': 'ui/gl',
329 'input_java_class': 'android/view/Surface.class',
331 'includes': [ '../../build/jar_file_jni_generator.gypi' ],
334 'target_name': 'gl_jni_headers',
337 'surface_texture_jni_headers',
338 'surface_jni_headers',
341 '../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java',
344 'jni_gen_package': 'ui/gl',
346 'includes': [ '../../build/jni_generator.gypi' ],