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