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',
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',
75 'gl_gl_api_implementation.cc',
76 'gl_gl_api_implementation.h',
80 'gl_image_ref_counted_memory.cc',
81 'gl_image_ref_counted_memory.h',
82 'gl_image_shared_memory.cc',
83 'gl_image_shared_memory.h',
86 'gl_implementation.cc',
87 'gl_implementation.h',
88 'gl_implementation_android.cc',
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',
101 'gl_surface_android.cc',
103 'gl_surface_stub.cc',
107 'gl_surface_osmesa.cc',
108 'gl_surface_osmesa.h',
109 'gl_surface_ozone.cc',
112 'gl_version_info.cc',
114 'gpu_switching_manager.cc',
115 'gpu_switching_manager.h',
116 'gpu_switching_observer.h',
119 'scoped_make_current.cc',
120 'scoped_make_current.h',
121 'sync_control_vsync_provider.cc',
122 'sync_control_vsync_provider.h',
123 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
124 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
125 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
126 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
128 # hard_dependency is necessary for this target because it has actions
129 # that generate header files included by dependent targets. The header
130 # files must be generated before the dependents are compiled. The usual
131 # semantics are to allow the two targets to build concurrently.
132 'hard_dependency': 1,
135 'action_name': 'generate_gl_bindings',
137 'generator_path': 'generate_bindings.py',
138 # Prefer khronos EGL/GLES headers by listing that path first.
139 'header_paths': '../../third_party/khronos:../../third_party/mesa/src/include:.:../../gpu',
143 '<!@(python <(generator_path) --header-paths=<(header_paths) --inputs)',
146 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
147 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
148 '<(gl_binding_output_dir)/gl_bindings_api_autogen_egl.h',
149 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
150 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
151 '<(gl_binding_output_dir)/gl_bindings_api_autogen_gl.h',
152 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
153 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
154 '<(gl_binding_output_dir)/gl_bindings_api_autogen_glx.h',
155 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
156 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.h',
157 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
158 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
159 '<(gl_binding_output_dir)/gl_bindings_api_autogen_osmesa.h',
160 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
161 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
162 '<(gl_binding_output_dir)/gl_bindings_api_autogen_wgl.h',
163 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
168 '--header-paths=<(header_paths)',
169 '<(gl_binding_output_dir)',
174 ['OS in ("win", "android", "linux")', {
186 'gl_egl_api_implementation.cc',
187 'gl_egl_api_implementation.h',
188 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
189 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
192 '<(DEPTH)/third_party/khronos',
195 ['OS in ("android", "linux")', {
197 'gl_implementation_osmesa.cc',
198 'gl_implementation_osmesa.h',
203 'gl_image_linux_dma_buffer.cc',
204 'gl_image_linux_dma_buffer.h',
211 'gl_glx_api_implementation.cc',
212 'gl_glx_api_implementation.h',
215 'gl_egl_api_implementation.cc',
216 'gl_egl_api_implementation.h',
217 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
218 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
220 'all_dependent_settings': {
222 'GL_GLEXT_PROTOTYPES',
226 '<(DEPTH)/build/linux/system.gyp:x11',
227 '<(DEPTH)/build/linux/system.gyp:xcomposite',
228 '<(DEPTH)/build/linux/system.gyp:xext',
229 '<(DEPTH)/ui/events/platform/events_platform.gyp:events_platform',
230 '<(DEPTH)/ui/gfx/x/gfx_x11.gyp:gfx_x11',
237 'gl_egl_api_implementation.cc',
238 'gl_egl_api_implementation.h',
241 'gl_wgl_api_implementation.cc',
242 'gl_wgl_api_implementation.h',
243 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
244 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
251 'AdditionalDependencies': [
268 'gl_image_io_surface.cc',
269 'gl_image_io_surface.h',
275 '$(SDKROOT)/System/Library/Frameworks/IOSurface.framework',
276 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
285 'gl_image_surface_texture.cc',
286 'gl_image_surface_texture.h',
294 'system_monitor_posix.cc',
297 'GL_GLEXT_PROTOTYPES',
298 'EGL_EGLEXT_PROTOTYPES',
302 'sources/': [ ['exclude', '^android/'] ],
306 '../ozone/ozone.gyp:ozone',
307 '../ozone/ozone.gyp:ozone_base',
310 ['OS=="android" and android_webview_build==0', {
312 '../android/ui_android.gyp:ui_java',
318 'target_name': 'gl_unittest_utils',
319 'type': 'static_library',
321 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
324 '../../testing/gmock.gyp:gmock',
325 '../../third_party/khronos/khronos.gyp:khronos_headers',
329 '<(gl_binding_output_dir)',
332 'direct_dependent_settings': {
334 '<(gl_binding_output_dir)',
340 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
341 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.h',
342 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
350 'target_name': 'surface_jni_headers',
353 'jni_gen_package': 'ui/gl',
354 'input_java_class': 'android/view/Surface.class',
356 'includes': [ '../../build/jar_file_jni_generator.gypi' ],
359 'target_name': 'gl_jni_headers',
362 'surface_jni_headers',
365 '../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java',
366 '../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java',
369 'jni_gen_package': 'ui/gl',
371 'includes': [ '../../build/jni_generator.gypi' ],