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/khronos',
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',
52 'android/surface_texture_tracker.cc',
53 'android/surface_texture_tracker.h',
55 'gl_bindings_skia_in_process.cc',
56 'gl_bindings_skia_in_process.h',
59 'gl_context_android.cc',
61 'gl_context_ozone.cc',
62 'gl_context_osmesa.cc',
63 'gl_context_osmesa.h',
66 'gl_context_stub_with_extensions.cc',
67 'gl_context_stub_with_extensions.h',
77 'gl_gl_api_implementation.cc',
78 'gl_gl_api_implementation.h',
83 'gl_image_ref_counted_memory.cc',
84 'gl_image_ref_counted_memory.h',
85 'gl_image_shared_memory.cc',
86 'gl_image_shared_memory.h',
89 'gl_implementation.cc',
90 'gl_implementation.h',
91 'gl_implementation_android.cc',
92 'gl_implementation_ozone.cc',
93 'gl_implementation_mac.cc',
94 'gl_implementation_win.cc',
95 'gl_implementation_x11.cc',
96 'gl_osmesa_api_implementation.cc',
97 'gl_osmesa_api_implementation.h',
100 'gl_state_restorer.cc',
101 'gl_state_restorer.h',
104 'gl_surface_android.cc',
106 'gl_surface_stub.cc',
110 'gl_surface_osmesa.cc',
111 'gl_surface_osmesa.h',
112 'gl_surface_ozone.cc',
115 'gl_version_info.cc',
117 'gpu_switching_manager.cc',
118 'gpu_switching_manager.h',
121 'scoped_make_current.cc',
122 'scoped_make_current.h',
123 'sync_control_vsync_provider.cc',
124 'sync_control_vsync_provider.h',
125 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
126 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
127 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
128 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
130 # hard_dependency is necessary for this target because it has actions
131 # that generate header files included by dependent targets. The header
132 # files must be generated before the dependents are compiled. The usual
133 # semantics are to allow the two targets to build concurrently.
134 'hard_dependency': 1,
137 'action_name': 'generate_gl_bindings',
139 'generator_path': 'generate_bindings.py',
140 # Prefer khronos EGL/GLES headers by listing that path first.
141 'header_paths': '../../third_party/khronos:../../third_party/mesa/src/include:.:../../gpu',
145 '<!@(python <(generator_path) --header-paths=<(header_paths) --inputs)',
148 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
149 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
150 '<(gl_binding_output_dir)/gl_bindings_api_autogen_egl.h',
151 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
152 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
153 '<(gl_binding_output_dir)/gl_bindings_api_autogen_gl.h',
154 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
155 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
156 '<(gl_binding_output_dir)/gl_bindings_api_autogen_glx.h',
157 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
158 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.h',
159 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
160 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
161 '<(gl_binding_output_dir)/gl_bindings_api_autogen_osmesa.h',
162 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
163 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
164 '<(gl_binding_output_dir)/gl_bindings_api_autogen_wgl.h',
165 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
170 '--header-paths=<(header_paths)',
171 '<(gl_binding_output_dir)',
176 ['OS in ("win", "android", "linux")', {
188 'gl_egl_api_implementation.cc',
189 'gl_egl_api_implementation.h',
190 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
191 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
194 '<(DEPTH)/third_party/khronos',
197 ['OS in ("android", "linux")', {
199 'gl_implementation_osmesa.cc',
200 'gl_implementation_osmesa.h',
207 'gl_glx_api_implementation.cc',
208 'gl_glx_api_implementation.h',
213 'gl_egl_api_implementation.cc',
214 'gl_egl_api_implementation.h',
215 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
216 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
218 'all_dependent_settings': {
220 'GL_GLEXT_PROTOTYPES',
224 '<(DEPTH)/build/linux/system.gyp:x11',
225 '<(DEPTH)/build/linux/system.gyp:xcomposite',
226 '<(DEPTH)/build/linux/system.gyp:xext',
227 '<(DEPTH)/ui/events/platform/events_platform.gyp:events_platform',
228 '<(DEPTH)/ui/gfx/x/gfx_x11.gyp:gfx_x11',
235 'gl_egl_api_implementation.cc',
236 'gl_egl_api_implementation.h',
239 'gl_wgl_api_implementation.cc',
240 'gl_wgl_api_implementation.h',
241 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
242 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
249 'AdditionalDependencies': [
264 'gl_image_io_surface.cc',
265 'gl_image_io_surface.h',
271 '$(SDKROOT)/System/Library/Frameworks/IOSurface.framework',
272 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
281 'gl_image_android_native_buffer.cc',
282 'gl_image_android_native_buffer.h',
283 'gl_image_surface_texture.cc',
284 'gl_image_surface_texture.h',
292 'system_monitor_posix.cc',
295 'GL_GLEXT_PROTOTYPES',
296 'EGL_EGLEXT_PROTOTYPES',
300 'sources/': [ ['exclude', '^android/'] ],
304 '../ozone/ozone.gyp:ozone',
305 '../ozone/ozone.gyp:ozone_base',
308 ['OS=="android" and android_webview_build==0', {
310 '../android/ui_android.gyp:ui_java',
316 'target_name': 'gl_unittest_utils',
317 'type': 'static_library',
319 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
322 '../../testing/gmock.gyp:gmock',
323 '../../third_party/khronos/khronos.gyp:khronos_headers',
327 '<(gl_binding_output_dir)',
330 'direct_dependent_settings': {
332 '<(gl_binding_output_dir)',
338 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
339 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.h',
340 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
348 'target_name': 'surface_jni_headers',
351 'jni_gen_package': 'ui/gl',
352 'input_java_class': 'android/view/Surface.class',
354 'includes': [ '../../build/jar_file_jni_generator.gypi' ],
357 'target_name': 'gl_jni_headers',
360 'surface_jni_headers',
363 '../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java',
364 '../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java',
367 'jni_gen_package': 'ui/gl',
369 'includes': [ '../../build/jni_generator.gypi' ],