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/gfx/gfx.gyp:gfx',
22 '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
25 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
31 '<(DEPTH)/third_party/swiftshader/include',
32 '<(DEPTH)/third_party/mesa/src/include',
33 '<(gl_binding_output_dir)',
35 'direct_dependent_settings': {
37 '<(gl_binding_output_dir)',
40 'export_dependent_settings': [
41 '<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers',
44 'android/gl_jni_registrar.cc',
45 'android/gl_jni_registrar.h',
46 'android/scoped_java_surface.cc',
47 'android/scoped_java_surface.h',
48 'android/surface_texture.cc',
49 'android/surface_texture.h',
50 'android/surface_texture_listener.cc',
51 'android/surface_texture_listener.h',
53 'gl_bindings_skia_in_process.cc',
54 'gl_bindings_skia_in_process.h',
57 'gl_context_android.cc',
59 'gl_context_ozone.cc',
60 'gl_context_osmesa.cc',
61 'gl_context_osmesa.h',
64 'gl_context_stub_with_extensions.cc',
65 'gl_context_stub_with_extensions.h',
71 'gl_gl_api_implementation.cc',
72 'gl_gl_api_implementation.h',
75 'gl_image_android.cc',
84 'gl_implementation.cc',
85 'gl_implementation.h',
86 'gl_implementation_android.cc',
87 'gl_implementation_linux.cc',
88 'gl_implementation_linux.h',
89 'gl_implementation_ozone.cc',
90 'gl_implementation_mac.cc',
91 'gl_implementation_win.cc',
92 'gl_implementation_x11.cc',
93 'gl_osmesa_api_implementation.cc',
94 'gl_osmesa_api_implementation.h',
97 'gl_state_restorer.cc',
98 'gl_state_restorer.h',
102 'gl_surface_stub.cc',
106 'gl_surface_osmesa.cc',
107 'gl_surface_osmesa.h',
110 'gl_version_info.cc',
112 'gpu_switching_manager.cc',
113 'gpu_switching_manager.h',
114 'io_surface_support_mac.cc',
115 'io_surface_support_mac.h',
118 'scoped_make_current.cc',
119 'scoped_make_current.h',
120 'sync_control_vsync_provider.cc',
121 'sync_control_vsync_provider.h',
122 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
123 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
124 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
125 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
127 # hard_dependency is necessary for this target because it has actions
128 # that generate header files included by dependent targets. The header
129 # files must be generated before the dependents are compiled. The usual
130 # semantics are to allow the two targets to build concurrently.
131 'hard_dependency': 1,
134 'action_name': 'generate_gl_bindings',
136 'generator_path': 'generate_bindings.py',
137 # Prefer khronos EGL/GLES headers by listing that path first.
138 'header_paths': '../../third_party/khronos:../../third_party/mesa/src/include',
142 '<!@(python <(generator_path) --header-paths=<(header_paths) --inputs)',
145 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
146 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
147 '<(gl_binding_output_dir)/gl_bindings_api_autogen_egl.h',
148 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
149 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
150 '<(gl_binding_output_dir)/gl_bindings_api_autogen_gl.h',
151 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
152 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
153 '<(gl_binding_output_dir)/gl_bindings_api_autogen_glx.h',
154 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
155 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.h',
156 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
157 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
158 '<(gl_binding_output_dir)/gl_bindings_api_autogen_osmesa.h',
159 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
160 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
161 '<(gl_binding_output_dir)/gl_bindings_api_autogen_wgl.h',
162 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
167 '--header-paths=<(header_paths)',
168 '<(gl_binding_output_dir)',
173 ['OS in ("win", "android", "linux")', {
181 'gl_egl_api_implementation.cc',
182 'gl_egl_api_implementation.h',
183 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
184 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
187 '<(DEPTH)/third_party/khronos',
194 'gl_glx_api_implementation.cc',
195 'gl_glx_api_implementation.h',
200 'gl_egl_api_implementation.cc',
201 'gl_egl_api_implementation.h',
202 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
203 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
205 'all_dependent_settings': {
207 'GL_GLEXT_PROTOTYPES',
211 '<(DEPTH)/build/linux/system.gyp:x11',
212 '<(DEPTH)/build/linux/system.gyp:xcomposite',
213 '<(DEPTH)/build/linux/system.gyp:xext',
220 'gl_egl_api_implementation.cc',
221 'gl_egl_api_implementation.h',
224 'gl_wgl_api_implementation.cc',
225 'gl_wgl_api_implementation.h',
226 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
227 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
234 'AdditionalDependencies': [
249 'gl_image_io_surface.cc',
250 'gl_image_io_surface.h',
253 'gl_context_nsview.mm',
254 'gl_context_nsview.h',
255 'gl_surface_nsview.mm',
256 'gl_surface_nsview.h',
262 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
280 'gl_context_osmesa.cc',
281 'system_monitor_posix.cc',
284 'GL_GLEXT_PROTOTYPES',
285 'EGL_EGLEXT_PROTOTYPES',
289 'sources/': [ ['exclude', '^android/'] ],
293 '../ozone/ozone.gyp:ozone',
299 'target_name': 'gl_unittest_utils',
300 'type': 'static_library',
302 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
305 '../../testing/gmock.gyp:gmock',
306 '../../third_party/khronos/khronos.gyp:khronos_headers',
310 '<(gl_binding_output_dir)',
313 'direct_dependent_settings': {
315 '<(gl_binding_output_dir)',
321 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
322 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.h',
323 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
331 'target_name': 'surface_jni_headers',
334 'jni_gen_package': 'ui/gl',
335 'input_java_class': 'android/view/Surface.class',
336 'jni_generator_ptr_type': 'long',
338 'includes': [ '../../build/jar_file_jni_generator.gypi' ],
341 'target_name': 'gl_jni_headers',
344 'surface_jni_headers',
347 '../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java',
348 '../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java',
351 'jni_gen_package': 'ui/gl',
352 'jni_generator_ptr_type': 'long',
354 'includes': [ '../../build/jni_generator.gypi' ],