compositor.gyp revision 5f1c94371a64b3196d4be9466099bb892df9b88e
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)/gpu/gpu.gyp:command_buffer_common',
18        '<(DEPTH)/skia/skia.gyp:skia',
19        '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
20        '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
21        '<(DEPTH)/ui/gl/gl.gyp:gl',
22      ],
23      'defines': [
24        'COMPOSITOR_IMPLEMENTATION',
25      ],
26      'sources': [
27        'compositor.cc',
28        'compositor.h',
29        'compositor_animation_observer.h',
30        'compositor_export.h',
31        'compositor_observer.h',
32        'compositor_vsync_manager.cc',
33        'compositor_vsync_manager.h',
34        'compositor_switches.cc',
35        'compositor_switches.h',
36        'debug_utils.cc',
37        'debug_utils.h',
38        'dip_util.cc',
39        'dip_util.h',
40        'float_animation_curve_adapter.cc',
41        'float_animation_curve_adapter.h',
42        'layer.cc',
43        'layer.h',
44        'layer_animation_delegate.h',
45        'layer_animation_element.cc',
46        'layer_animation_element.h',
47        'layer_animation_observer.cc',
48        'layer_animation_observer.h',
49        'layer_animation_sequence.cc',
50        'layer_animation_sequence.h',
51        'layer_animator.cc',
52        'layer_animator.h',
53        'layer_animator_collection.cc',
54        'layer_animator_collection.h',
55        'layer_delegate.h',
56        'layer_owner.cc',
57        'layer_owner.h',
58        'layer_tree_owner.cc',
59        'layer_tree_owner.h',
60        'layer_type.h',
61        'reflector.h',
62        'scoped_animation_duration_scale_mode.cc',
63        'scoped_animation_duration_scale_mode.h',
64        'scoped_layer_animation_settings.cc',
65        'scoped_layer_animation_settings.h',
66        'transform_animation_curve_adapter.cc',
67        'transform_animation_curve_adapter.h',
68      ],
69      'conditions': [
70        ['OS == "win" and use_aura == 1', {
71          # TODO(sky): before we make this real need to remove
72          # IDR_BITMAP_BRUSH_IMAGE.
73          'dependencies': [
74            '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
75            '<(angle_path)/src/build_angle.gyp:libEGL',
76            '<(angle_path)/src/build_angle.gyp:libGLESv2',
77          ],
78        }],
79      ],
80    },
81    {
82      'target_name': 'compositor_test_support',
83      'type': 'static_library',
84      'dependencies': [
85        '<(DEPTH)/base/base.gyp:base',
86        '<(DEPTH)/cc/cc.gyp:cc',
87        '<(DEPTH)/cc/cc_tests.gyp:cc_test_support',
88        '<(DEPTH)/skia/skia.gyp:skia',
89        '<(DEPTH)/testing/gtest.gyp:gtest',
90        '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink_minimal',
91        '<(DEPTH)/ui/base/ui_base.gyp:ui_base',
92        '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
93        '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
94        '<(DEPTH)/ui/gl/gl.gyp:gl',
95        '<(DEPTH)/webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
96        'compositor',
97      ],
98      'sources': [
99        'test/context_factories_for_test.cc',
100        'test/context_factories_for_test.h',
101        'test/draw_waiter_for_test.cc',
102        'test/draw_waiter_for_test.h',
103        'test/in_process_context_factory.cc',
104        'test/in_process_context_factory.h',
105        'test/layer_animator_test_controller.cc',
106        'test/layer_animator_test_controller.h',
107        'test/test_compositor_host.h',
108        'test/test_compositor_host_mac.mm',
109        'test/test_compositor_host_ozone.cc',
110        'test/test_compositor_host_win.cc',
111        'test/test_compositor_host_x11.cc',
112        'test/test_layer_animation_delegate.cc',
113        'test/test_layer_animation_delegate.h',
114        'test/test_layer_animation_observer.cc',
115        'test/test_layer_animation_observer.h',
116        'test/test_layers.cc',
117        'test/test_layers.h',
118        'test/test_suite.cc',
119        'test/test_suite.h',
120        'test/test_utils.cc',
121        'test/test_utils.h',
122      ],
123      'conditions': [
124        ['use_x11==1', {
125          'dependencies': [
126            '<(DEPTH)/build/linux/system.gyp:x11',
127            '<(DEPTH)/ui/gfx/x/gfx_x11.gyp:gfx_x11',
128          ]
129        }]
130      ]
131    },
132    {
133      'target_name': 'compositor_unittests',
134      'type': 'executable',
135      'dependencies': [
136        '<(DEPTH)/base/base.gyp:base',
137        '<(DEPTH)/base/base.gyp:test_support_base',
138        '<(DEPTH)/cc/cc.gyp:cc',
139        '<(DEPTH)/cc/cc_tests.gyp:cc_test_support',
140        '<(DEPTH)/skia/skia.gyp:skia',
141        '<(DEPTH)/testing/gtest.gyp:gtest',
142        '<(DEPTH)/ui/base/ui_base.gyp:ui_base',
143        '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
144        '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
145        '<(DEPTH)/ui/gl/gl.gyp:gl',
146        '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
147        'compositor',
148        'compositor_test_support',
149      ],
150      'sources': [
151        'layer_animation_element_unittest.cc',
152        'layer_animation_sequence_unittest.cc',
153        'layer_animator_unittest.cc',
154        'layer_owner_unittest.cc',
155        'layer_unittest.cc',
156        'run_all_unittests.cc',
157        'transform_animation_curve_adapter_unittest.cc',
158      ],
159      'conditions': [
160        # osmesa GL implementation is used on linux.
161        ['OS=="linux"', {
162          'dependencies': [
163            '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa',
164          ],
165        }],
166        ['os_posix == 1 and OS != "mac"', {
167          'conditions': [
168            ['use_allocator!="none"', {
169              'dependencies': [
170                '<(DEPTH)/base/allocator/allocator.gyp:allocator',
171              ],
172            }],
173          ],
174        }],
175      ],
176    },
177  ],
178}
179