# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'gl', 'type': '<(component)', 'product_name': 'gl_wrapper', # Avoid colliding with OS X's libGL.dylib 'dependencies': [ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '<(DEPTH)/gpu/command_buffer/command_buffer.gyp:gles2_utils', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers', '<(DEPTH)/ui/gfx/gfx.gyp:gfx', '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', ], 'variables': { 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl', }, 'defines': [ 'GL_IMPLEMENTATION', ], 'include_dirs': [ '<(DEPTH)/third_party/swiftshader/include', '<(DEPTH)/third_party/khronos', '<(DEPTH)/third_party/mesa/src/include', '<(gl_binding_output_dir)', ], 'direct_dependent_settings': { 'include_dirs': [ '<(gl_binding_output_dir)', ], }, 'export_dependent_settings': [ '<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers', ], 'sources': [ 'android/gl_jni_registrar.cc', 'android/gl_jni_registrar.h', 'android/scoped_java_surface.cc', 'android/scoped_java_surface.h', 'android/surface_texture.cc', 'android/surface_texture.h', 'android/surface_texture_listener.cc', 'android/surface_texture_listener.h', 'android/surface_texture_tracker.cc', 'android/surface_texture_tracker.h', 'gl_bindings.h', 'gl_bindings_skia_in_process.cc', 'gl_bindings_skia_in_process.h', 'gl_context.cc', 'gl_context.h', 'gl_context_android.cc', 'gl_context_mac.mm', 'gl_context_ozone.cc', 'gl_context_osmesa.cc', 'gl_context_osmesa.h', 'gl_context_stub.cc', 'gl_context_stub.h', 'gl_context_stub_with_extensions.cc', 'gl_context_stub_with_extensions.h', 'gl_context_win.cc', 'gl_context_x11.cc', 'gl_export.h', 'gl_fence.cc', 'gl_fence.h', 'gl_fence_arb.cc', 'gl_fence_arb.h', 'gl_fence_nv.cc', 'gl_fence_nv.h', 'gl_gl_api_implementation.cc', 'gl_gl_api_implementation.h', 'gl_image.cc', 'gl_image.h', 'gl_image_memory.cc', 'gl_image_memory.h', 'gl_image_ref_counted_memory.cc', 'gl_image_ref_counted_memory.h', 'gl_image_shared_memory.cc', 'gl_image_shared_memory.h', 'gl_image_stub.cc', 'gl_image_stub.h', 'gl_implementation.cc', 'gl_implementation.h', 'gl_implementation_android.cc', 'gl_implementation_ozone.cc', 'gl_implementation_mac.cc', 'gl_implementation_win.cc', 'gl_implementation_x11.cc', 'gl_osmesa_api_implementation.cc', 'gl_osmesa_api_implementation.h', 'gl_share_group.cc', 'gl_share_group.h', 'gl_state_restorer.cc', 'gl_state_restorer.h', 'gl_surface.cc', 'gl_surface.h', 'gl_surface_android.cc', 'gl_surface_mac.cc', 'gl_surface_stub.cc', 'gl_surface_stub.h', 'gl_surface_win.cc', 'gl_surface_x11.cc', 'gl_surface_osmesa.cc', 'gl_surface_osmesa.h', 'gl_surface_ozone.cc', 'gl_switches.cc', 'gl_switches.h', 'gl_version_info.cc', 'gl_version_info.h', 'gpu_switching_manager.cc', 'gpu_switching_manager.h', 'scoped_binders.cc', 'scoped_binders.h', 'scoped_make_current.cc', 'scoped_make_current.h', 'sync_control_vsync_provider.cc', 'sync_control_vsync_provider.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_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 targets. 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', 'variables': { 'generator_path': 'generate_bindings.py', # Prefer khronos EGL/GLES headers by listing that path first. 'header_paths': '../../third_party/khronos:../../third_party/mesa/src/include:.:../../gpu', }, 'inputs': [ '<(generator_path)', '