OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'chromium_code': 1, | 7 'chromium_code': 1, |
8 }, | 8 }, |
9 'target_defaults': { | |
10 'sources/': [ | |
11 ['exclude', '_(gl|win)\\.(cc?)$'], | |
12 ], | |
13 'conditions': [ | |
14 ['os_posix == 1 and OS != "mac"', { | |
15 'sources/': [['include', '_(gl)\\.(h|cc)$'],] | |
16 }], | |
17 ['OS == "win"', { | |
18 'sources/': [['include', '_(win)\\.(h|cc)$'],] | |
19 }], | |
20 ], | |
21 }, | |
22 'targets': [ | 9 'targets': [ |
23 { | 10 { |
24 'target_name': 'compositor', | 11 'target_name': 'compositor', |
25 'type': '<(component)', | 12 'type': '<(component)', |
26 'dependencies': [ | 13 'dependencies': [ |
27 '<(DEPTH)/base/base.gyp:base', | 14 '<(DEPTH)/base/base.gyp:base', |
28 '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:d
ynamic_annotations', | 15 '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:d
ynamic_annotations', |
29 '<(DEPTH)/skia/skia.gyp:skia', | 16 '<(DEPTH)/skia/skia.gyp:skia', |
| 17 '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', |
30 '<(DEPTH)/ui/gfx/gl/gl.gyp:gl', | 18 '<(DEPTH)/ui/gfx/gl/gl.gyp:gl', |
31 '<(DEPTH)/ui/ui.gyp:ui', | 19 '<(DEPTH)/ui/ui.gyp:ui', |
| 20 '<(DEPTH)/webkit/support/webkit_support.gyp:fileapi', |
| 21 '<(DEPTH)/webkit/support/webkit_support.gyp:glue', |
| 22 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_gpu', |
32 ], | 23 ], |
33 'defines': [ | 24 'defines': [ |
34 'COMPOSITOR_IMPLEMENTATION', | 25 'COMPOSITOR_IMPLEMENTATION', |
35 ], | 26 ], |
36 'sources': [ | 27 'sources': [ |
37 'compositor.cc', | 28 'compositor.cc', |
38 'compositor.h', | 29 'compositor.h', |
39 'compositor_export.h', | 30 'compositor_export.h', |
40 'compositor_gl.cc', | |
41 'compositor_gl.h', | |
42 'compositor_cc.cc', | 31 'compositor_cc.cc', |
43 'compositor_cc.h', | 32 'compositor_cc.h', |
44 'compositor_observer.h', | 33 'compositor_observer.h', |
45 'compositor_setup.h', | 34 'compositor_setup.h', |
46 'compositor_stub.cc', | |
47 'compositor_switches.cc', | 35 'compositor_switches.cc', |
48 'compositor_switches.h', | 36 'compositor_switches.h', |
49 'compositor_win.cc', | |
50 'debug_utils.cc', | 37 'debug_utils.cc', |
51 'debug_utils.h', | 38 'debug_utils.h', |
52 'layer.cc', | 39 'layer.cc', |
53 'layer.h', | 40 'layer.h', |
54 'layer_animation_delegate.h', | 41 'layer_animation_delegate.h', |
55 'layer_animation_element.cc', | 42 'layer_animation_element.cc', |
56 'layer_animation_element.h', | 43 'layer_animation_element.h', |
57 'layer_animation_observer.cc', | 44 'layer_animation_observer.cc', |
58 'layer_animation_observer.h', | 45 'layer_animation_observer.h', |
59 'layer_animation_sequence.cc', | 46 'layer_animation_sequence.cc', |
60 'layer_animation_sequence.h', | 47 'layer_animation_sequence.h', |
61 'layer_animator.cc', | 48 'layer_animator.cc', |
62 'layer_animator.h', | 49 'layer_animator.h', |
63 'scoped_layer_animation_settings.cc', | 50 'scoped_layer_animation_settings.cc', |
64 'scoped_layer_animation_settings.h', | 51 'scoped_layer_animation_settings.h', |
65 'screen_rotation.cc', | 52 'screen_rotation.cc', |
66 'screen_rotation.h', | 53 'screen_rotation.h', |
67 # UI tests need TestWebGraphicsContext3D, so we always build it. | 54 # UI tests need TestWebGraphicsContext3D, so we always build it. |
68 'test_web_graphics_context_3d.cc', | 55 'test_web_graphics_context_3d.cc', |
69 'test_web_graphics_context_3d.h', | 56 'test_web_graphics_context_3d.h', |
70 ], | 57 ], |
71 'conditions': [ | 58 'conditions': [ |
72 ['os_posix == 1', { | |
73 'sources!': [ | |
74 'compositor_stub.cc', | |
75 ], | |
76 }], | |
77 ['OS == "win" and views_compositor == 1', { | 59 ['OS == "win" and views_compositor == 1', { |
78 'sources!': [ | |
79 'compositor_stub.cc', | |
80 ], | |
81 # TODO(sky): before we make this real need to remove | 60 # TODO(sky): before we make this real need to remove |
82 # IDR_BITMAP_BRUSH_IMAGE. | 61 # IDR_BITMAP_BRUSH_IMAGE. |
83 'dependencies': [ | 62 'dependencies': [ |
84 '<(DEPTH)/ui/ui.gyp:gfx_resources', | 63 '<(DEPTH)/ui/ui.gyp:gfx_resources', |
85 '<(DEPTH)/third_party/angle/src/build_angle.gyp:libEGL', | 64 '<(DEPTH)/third_party/angle/src/build_angle.gyp:libEGL', |
86 '<(DEPTH)/third_party/angle/src/build_angle.gyp:libGLESv2', | 65 '<(DEPTH)/third_party/angle/src/build_angle.gyp:libGLESv2', |
87 ], | 66 ], |
88 'link_settings': { | |
89 'libraries': [ | |
90 '-ld3d10.lib', | |
91 '-ld3dx10d.lib', | |
92 '-ldxerr.lib', | |
93 '-ldxguid.lib', | |
94 ] | |
95 }, | |
96 }], | 67 }], |
97 ['OS == "win" and views_compositor == 0', { | |
98 'sources/': [ | |
99 ['exclude', '^compositor_win.cc'], | |
100 ], | |
101 }], | |
102 ['use_webkit_compositor == 1', { | |
103 'sources/': [ | |
104 ['exclude', '^compositor_(gl|mac|win|stub).(h|cc|mm)$'], | |
105 ], | |
106 'dependencies': [ | |
107 '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:web
kit', | |
108 '<(DEPTH)/webkit/support/webkit_support.gyp:fileapi', | |
109 '<(DEPTH)/webkit/support/webkit_support.gyp:glue', | |
110 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_gpu', | |
111 ], | |
112 }, { | |
113 'sources!': [ | |
114 'compositor_cc.cc', | |
115 'compositor_cc.h', | |
116 'compositor_setup.h', | |
117 'test_web_graphics_context_3d.cc', | |
118 'test_web_graphics_context_3d.h', | |
119 ], | |
120 } | |
121 ], | |
122 ], | 68 ], |
123 }, | 69 }, |
124 { | 70 { |
125 'target_name': 'compositor_test_support', | 71 'target_name': 'compositor_test_support', |
126 'type': 'static_library', | 72 'type': 'static_library', |
127 'dependencies': [ | 73 'dependencies': [ |
128 '<(DEPTH)/base/base.gyp:base', | 74 '<(DEPTH)/base/base.gyp:base', |
| 75 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_support', |
| 76 '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', |
129 ], | 77 ], |
130 'sources': [ | 78 'sources': [ |
131 'test/compositor_test_support.cc', | 79 'test/compositor_test_support.cc', |
132 'test/compositor_test_support.h', | 80 'test/compositor_test_support.h', |
133 ], | 81 ], |
134 'conditions': [ | 82 'conditions': [ |
135 ['use_webkit_compositor == 1', { | |
136 'dependencies': [ | |
137 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_support', | |
138 '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webki
t', | |
139 ], | |
140 }], | |
141 ['os_posix == 1 and OS != "mac"', { | 83 ['os_posix == 1 and OS != "mac"', { |
142 'conditions': [ | 84 'conditions': [ |
143 ['linux_use_tcmalloc==1', { | 85 ['linux_use_tcmalloc==1', { |
144 'dependencies': [ | 86 'dependencies': [ |
145 '<(DEPTH)/base/allocator/allocator.gyp:allocator', | 87 '<(DEPTH)/base/allocator/allocator.gyp:allocator', |
146 ], | 88 ], |
147 }], | 89 }], |
148 ], | 90 ], |
149 }], | 91 }], |
150 ], | 92 ], |
151 }, | 93 }, |
152 { | 94 { |
153 'target_name': 'compositor_unittests', | 95 'target_name': 'compositor_unittests', |
154 'type': 'executable', | 96 'type': 'executable', |
155 'dependencies': [ | 97 'dependencies': [ |
156 '<(DEPTH)/base/base.gyp:base', | 98 '<(DEPTH)/base/base.gyp:base', |
157 '<(DEPTH)/base/base.gyp:test_support_base', | 99 '<(DEPTH)/base/base.gyp:test_support_base', |
158 '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources', | |
159 '<(DEPTH)/skia/skia.gyp:skia', | 100 '<(DEPTH)/skia/skia.gyp:skia', |
160 '<(DEPTH)/testing/gtest.gyp:gtest', | 101 '<(DEPTH)/testing/gtest.gyp:gtest', |
161 '<(DEPTH)/ui/gfx/gl/gl.gyp:gl', | 102 '<(DEPTH)/ui/gfx/gl/gl.gyp:gl', |
162 '<(DEPTH)/ui/ui.gyp:gfx_resources', | |
163 '<(DEPTH)/ui/ui.gyp:ui', | 103 '<(DEPTH)/ui/ui.gyp:ui', |
164 '<(DEPTH)/ui/ui.gyp:ui_resources', | |
165 'compositor', | 104 'compositor', |
166 'compositor_test_support', | 105 'compositor_test_support', |
167 ], | 106 ], |
168 'sources': [ | 107 'sources': [ |
169 'layer_animation_element_unittest.cc', | 108 'layer_animation_element_unittest.cc', |
170 'layer_animation_sequence_unittest.cc', | 109 'layer_animation_sequence_unittest.cc', |
171 'layer_animator_unittest.cc', | 110 'layer_animator_unittest.cc', |
172 'layer_unittest.cc', | 111 'layer_unittest.cc', |
173 'run_all_unittests.cc', | 112 'run_all_unittests.cc', |
174 'test/test_compositor_host.h', | 113 'test/test_compositor_host.h', |
175 'test/test_compositor_host_linux.cc', | 114 'test/test_compositor_host_linux.cc', |
176 'test/test_compositor_host_mac.mm', | 115 'test/test_compositor_host_mac.mm', |
177 'test/test_compositor_host_win.cc', | 116 'test/test_compositor_host_win.cc', |
178 'test/test_layer_animation_delegate.cc', | 117 'test/test_layer_animation_delegate.cc', |
179 'test/test_layer_animation_delegate.h', | 118 'test/test_layer_animation_delegate.h', |
180 'test/test_layer_animation_observer.cc', | 119 'test/test_layer_animation_observer.cc', |
181 'test/test_layer_animation_observer.h', | 120 'test/test_layer_animation_observer.h', |
182 'test/test_suite.cc', | 121 'test/test_suite.cc', |
183 'test/test_suite.h', | 122 'test/test_suite.h', |
184 'test/test_utils.cc', | 123 'test/test_utils.cc', |
185 'test/test_utils.h', | 124 'test/test_utils.h', |
186 '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.rc', | 125 '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.rc', |
187 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc', | 126 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc' |
188 ], | 127 ], |
189 'conditions': [ | 128 'conditions': [ |
190 # osmesa GL implementation is used on linux. | 129 # osmesa GL implementation is used on linux. |
191 ['OS=="linux"', { | 130 ['OS=="linux"', { |
192 'dependencies': [ | 131 'dependencies': [ |
193 '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa', | 132 '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa', |
194 ], | 133 ], |
195 }], | 134 }], |
196 ['use_webkit_compositor==0', { | |
197 'dependencies': [ | |
198 'test_compositor', | |
199 ], | |
200 }], | |
201 ], | |
202 }, | |
203 { | |
204 'target_name': 'test_compositor', | |
205 'type': 'static_library', | |
206 'dependencies': [ | |
207 '<(DEPTH)/base/base.gyp:base', | |
208 ], | |
209 'sources': [ | |
210 '../test/gfx_test_utils.cc', | |
211 '../test/gfx_test_utils.h', | |
212 ], | |
213 'conditions': [ | |
214 # We allow on platforms without a compositor (such as OS_WIN). | |
215 # They will use compositor_stub.cc. | |
216 ['toolkit_views == 1 or os_posix==1', { | |
217 'dependencies': [ | |
218 '<(DEPTH)/skia/skia.gyp:skia', | |
219 'compositor', | |
220 ], | |
221 'sources': [ | |
222 'test/test_compositor.cc', | |
223 'test/test_compositor.h', | |
224 'test/test_texture.cc', | |
225 'test/test_texture.h', | |
226 ], | |
227 }], | |
228 ], | 135 ], |
229 }, | 136 }, |
230 ], | 137 ], |
231 } | 138 } |
OLD | NEW |