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. 4 5 { 6 'variables': { 7 'chromium_code': 1, 8 }, 9 'targets': [ 10 { 11 'target_name': 'compositor', 12 'type': '<(component)', 13 'dependencies': [ 14 '<(DEPTH)/base/base.gyp:base', 15 '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 16 '<(DEPTH)/cc/cc.gyp:cc', 17 '<(DEPTH)/skia/skia.gyp:skia', 18 '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink_minimal', 19 '<(DEPTH)/ui/gl/gl.gyp:gl', 20 '<(DEPTH)/ui/ui.gyp:ui', 21 '<(DEPTH)/webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', 22 ], 23 'defines': [ 24 'COMPOSITOR_IMPLEMENTATION', 25 ], 26 'sources': [ 27 'compositor.cc', 28 'compositor.h', 29 'compositor_export.h', 30 'compositor_observer.h', 31 'compositor_switches.cc', 32 'compositor_switches.h', 33 'context_provider_from_context_factory.cc', 34 'context_provider_from_context_factory.h', 35 'debug_utils.cc', 36 'debug_utils.h', 37 'dip_util.cc', 38 'dip_util.h', 39 'float_animation_curve_adapter.cc', 40 'float_animation_curve_adapter.h', 41 'layer.cc', 42 'layer.h', 43 'layer_animation_delegate.h', 44 'layer_animation_element.cc', 45 'layer_animation_element.h', 46 'layer_animation_observer.cc', 47 'layer_animation_observer.h', 48 'layer_animation_sequence.cc', 49 'layer_animation_sequence.h', 50 'layer_animator.cc', 51 'layer_animator.h', 52 'layer_delegate.h', 53 'layer_owner.cc', 54 'layer_owner.h', 55 'layer_type.h', 56 'reflector.h', 57 'scoped_animation_duration_scale_mode.cc', 58 'scoped_animation_duration_scale_mode.h', 59 'scoped_layer_animation_settings.cc', 60 'scoped_layer_animation_settings.h', 61 # UI tests need TestWebGraphicsContext3D, so we always build it. 62 'test_web_graphics_context_3d.cc', 63 'test_web_graphics_context_3d.h', 64 'transform_animation_curve_adapter.cc', 65 'transform_animation_curve_adapter.h', 66 ], 67 'conditions': [ 68 ['OS == "win" and use_aura == 1', { 69 # TODO(sky): before we make this real need to remove 70 # IDR_BITMAP_BRUSH_IMAGE. 71 'dependencies': [ 72 '<(DEPTH)/ui/ui.gyp:ui_resources', 73 '<(angle_path)/src/build_angle.gyp:libEGL', 74 '<(angle_path)/src/build_angle.gyp:libGLESv2', 75 ], 76 }], 77 ], 78 }, 79 { 80 'target_name': 'compositor_test_support', 81 'type': 'static_library', 82 'dependencies': [ 83 '<(DEPTH)/base/base.gyp:base', 84 '<(DEPTH)/skia/skia.gyp:skia', 85 '<(DEPTH)/ui/gl/gl.gyp:gl', 86 '<(DEPTH)/ui/ui.gyp:ui', 87 'compositor', 88 ], 89 'sources': [ 90 'test/test_layers.cc', 91 'test/test_layers.h', 92 'test/test_suite.cc', 93 'test/test_suite.h', 94 ], 95 }, 96 { 97 'target_name': 'compositor_unittests', 98 'type': 'executable', 99 'dependencies': [ 100 '<(DEPTH)/base/base.gyp:base', 101 '<(DEPTH)/base/base.gyp:test_support_base', 102 '<(DEPTH)/cc/cc.gyp:cc', 103 '<(DEPTH)/cc/cc_tests.gyp:cc_test_utils', 104 '<(DEPTH)/skia/skia.gyp:skia', 105 '<(DEPTH)/testing/gtest.gyp:gtest', 106 '<(DEPTH)/ui/gl/gl.gyp:gl', 107 '<(DEPTH)/ui/ui.gyp:ui', 108 '<(DEPTH)/ui/ui.gyp:ui_resources', 109 'compositor', 110 'compositor_test_support', 111 ], 112 'sources': [ 113 'layer_animation_element_unittest.cc', 114 'layer_animation_sequence_unittest.cc', 115 'layer_animator_unittest.cc', 116 'layer_unittest.cc', 117 'run_all_unittests.cc', 118 'test/layer_animator_test_controller.cc', 119 'test/layer_animator_test_controller.h', 120 'test/test_compositor_host.h', 121 'test/test_compositor_host_mac.mm', 122 'test/test_compositor_host_ozone.cc', 123 'test/test_compositor_host_win.cc', 124 'test/test_compositor_host_x11.cc', 125 'test/test_layer_animation_delegate.cc', 126 'test/test_layer_animation_delegate.h', 127 'test/test_layer_animation_observer.cc', 128 'test/test_layer_animation_observer.h', 129 'test/test_utils.cc', 130 'test/test_utils.h', 131 ], 132 'conditions': [ 133 # osmesa GL implementation is used on linux. 134 ['OS=="linux"', { 135 'dependencies': [ 136 '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa', 137 ], 138 }], 139 ['os_posix == 1 and OS != "mac"', { 140 'conditions': [ 141 ['linux_use_tcmalloc==1', { 142 'dependencies': [ 143 '<(DEPTH)/base/allocator/allocator.gyp:allocator', 144 ], 145 }], 146 ], 147 }], 148 ], 149 }, 150 ], 151 } 152