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