Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: ui/gfx/BUILD.gn

Issue 224633002: Add GN buildfile for gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/gn/builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2014 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 import("//build/config/ui.gni")
6 if (is_android) {
7 import("//build/config/android/config.gni")
8 }
9
10 component("gfx") {
11 sources = [
12 "android/device_display_info.cc",
13 "android/device_display_info.h",
14 "android/gfx_jni_registrar.cc",
15 "android/gfx_jni_registrar.h",
16 "android/java_bitmap.cc",
17 "android/java_bitmap.h",
18 "android/scroller.cc",
19 "android/scroller.h",
20 "android/shared_device_display_info.cc",
21 "android/shared_device_display_info.h",
22 "android/view_configuration.cc",
23 "android/view_configuration.h",
24 "animation/animation.cc",
25 "animation/animation.h",
26 "animation/animation_container.cc",
27 "animation/animation_container.h",
28 "animation/animation_container_element.h",
29 "animation/animation_container_observer.h",
30 "animation/animation_delegate.h",
31 "animation/linear_animation.cc",
32 "animation/linear_animation.h",
33 "animation/multi_animation.cc",
34 "animation/multi_animation.h",
35 "animation/slide_animation.cc",
36 "animation/slide_animation.h",
37 "animation/throb_animation.cc",
38 "animation/throb_animation.h",
39 "animation/tween.cc",
40 "animation/tween.h",
41 "blit.cc",
42 "blit.h",
43 "break_list.h",
44 "canvas.cc",
45 "canvas.h",
46 "canvas_android.cc",
47 "canvas_paint_mac.h",
48 "canvas_paint_mac.mm",
49 "canvas_paint_win.cc",
50 "canvas_paint_win.h",
51 "canvas_skia.cc",
52 "canvas_skia_paint.h",
53 "codec/jpeg_codec.cc",
54 "codec/jpeg_codec.h",
55 "codec/png_codec.cc",
56 "codec/png_codec.h",
57 "color_analysis.cc",
58 "color_analysis.h",
59 "color_profile.cc",
60 "color_profile.h",
61 "color_profile_mac.cc",
62 "color_profile_win.cc",
63 "color_utils.cc",
64 "color_utils.h",
65 "display.cc",
66 "display.h",
67 "display_observer.cc",
68 "display_observer.h",
69 "favicon_size.cc",
70 "favicon_size.h",
71 "font.cc",
72 "font.h",
73 "font_fallback_win.cc",
74 "font_fallback_win.h",
75 "font_list.cc",
76 "font_list.h",
77 "font_list_impl.cc",
78 "font_list_impl.h",
79 "font_render_params_android.cc",
80 "font_render_params_linux.cc",
81 "font_render_params_linux.h",
82 "font_smoothing_win.cc",
83 "font_smoothing_win.h",
84 "frame_time.h",
85 "gdi_util.cc",
86 "gdi_util.h",
87 "gfx_export.h",
88 "gfx_paths.cc",
89 "gfx_paths.h",
90 "gpu_memory_buffer.cc",
91 "gpu_memory_buffer.h",
92 "icon_util.cc",
93 "icon_util.h",
94 "image/canvas_image_source.cc",
95 "image/canvas_image_source.h",
96 "image/image.cc",
97 "image/image.h",
98 "image/image_family.cc",
99 "image/image_family.h",
100 "image/image_ios.mm",
101 "image/image_mac.mm",
102 "image/image_png_rep.cc",
103 "image/image_png_rep.h",
104 "image/image_skia.cc",
105 "image/image_skia.h",
106 "image/image_skia_operations.cc",
107 "image/image_skia_operations.h",
108 "image/image_skia_rep.cc",
109 "image/image_skia_rep.h",
110 "image/image_skia_source.h",
111 "image/image_skia_util_ios.h",
112 "image/image_skia_util_ios.mm",
113 "image/image_skia_util_mac.h",
114 "image/image_skia_util_mac.mm",
115 "image/image_util.cc",
116 "image/image_util.h",
117 "image/image_util_ios.mm",
118 "interpolated_transform.cc",
119 "interpolated_transform.h",
120 "linux_font_delegate.cc",
121 "linux_font_delegate.h",
122 "mac/scoped_ns_disable_screen_updates.h",
123 "native_widget_types.h",
124 "nine_image_painter.cc",
125 "nine_image_painter.h",
126 "ozone/dri/dri_skbitmap.cc",
127 "ozone/dri/dri_skbitmap.h",
128 "ozone/dri/dri_surface.cc",
129 "ozone/dri/dri_surface.h",
130 "ozone/dri/dri_surface_factory.cc",
131 "ozone/dri/dri_surface_factory.h",
132 "ozone/dri/dri_vsync_provider.cc",
133 "ozone/dri/dri_vsync_provider.h",
134 "ozone/dri/dri_wrapper.cc",
135 "ozone/dri/dri_wrapper.h",
136 "ozone/dri/hardware_display_controller.cc",
137 "ozone/dri/hardware_display_controller.h",
138 "ozone/impl/file_surface_factory.cc",
139 "ozone/impl/file_surface_factory.h",
140 "ozone/surface_factory_ozone.cc",
141 "ozone/surface_factory_ozone.h",
142 "ozone/surface_ozone_base.cc",
143 "ozone/surface_ozone_base.h",
144 "ozone/surface_ozone.h",
145 "ozone/overlay_candidates_ozone.cc",
146 "ozone/overlay_candidates_ozone.h",
147 "pango_util.cc",
148 "pango_util.h",
149 "path.cc",
150 "path.h",
151 "path_aura.cc",
152 "path_win.cc",
153 "path_win.h",
154 "path_x11.cc",
155 "path_x11.h",
156 "platform_font.h",
157 "platform_font_android.cc",
158 "platform_font_ios.h",
159 "platform_font_ios.mm",
160 "platform_font_mac.h",
161 "platform_font_mac.mm",
162 "platform_font_ozone.cc",
163 "platform_font_pango.cc",
164 "platform_font_pango.h",
165 "platform_font_win.cc",
166 "platform_font_win.h",
167 "range/range.cc",
168 "range/range.h",
169 "range/range_mac.mm",
170 "range/range_win.cc",
171 "render_text.cc",
172 "render_text.h",
173 "render_text_mac.cc",
174 "render_text_mac.h",
175 "render_text_ozone.cc",
176 "render_text_pango.cc",
177 "render_text_pango.h",
178 "render_text_win.cc",
179 "render_text_win.h",
180 "scoped_canvas.h",
181 "scoped_cg_context_save_gstate_mac.h",
182 "scoped_ns_graphics_context_save_gstate_mac.h",
183 "scoped_ns_graphics_context_save_gstate_mac.mm",
184 "scoped_ui_graphics_push_context_ios.h",
185 "scoped_ui_graphics_push_context_ios.mm",
186 "screen.cc",
187 "screen.h",
188 "screen_android.cc",
189 "screen_aura.cc",
190 "screen_ios.mm",
191 "screen_mac.mm",
192 "screen_win.cc",
193 "screen_win.h",
194 "scrollbar_size.cc",
195 "scrollbar_size.h",
196 "selection_model.cc",
197 "selection_model.h",
198 "sequential_id_generator.cc",
199 "sequential_id_generator.h",
200 "shadow_value.cc",
201 "shadow_value.h",
202 "skbitmap_operations.cc",
203 "skbitmap_operations.h",
204 "skia_util.cc",
205 "skia_util.h",
206 "switches.cc",
207 "switches.h",
208 "sys_color_change_listener.cc",
209 "sys_color_change_listener.h",
210 "text_constants.h",
211 "text_elider.cc",
212 "text_elider.h",
213 "text_utils.cc",
214 "text_utils.h",
215 "text_utils_android.cc",
216 "text_utils_ios.mm",
217 "text_utils_skia.cc",
218 "transform.cc",
219 "transform.h",
220 "transform_util.cc",
221 "transform_util.h",
222 "ui_gfx_exports.cc",
223 "utf16_indexing.cc",
224 "utf16_indexing.h",
225 "vsync_provider.h",
226 "win/dpi.cc",
227 "win/dpi.h",
228 "win/hwnd_util.cc",
229 "win/hwnd_util.h",
230 "win/scoped_set_map_mode.h",
231 "win/singleton_hwnd.cc",
232 "win/singleton_hwnd.h",
233 "win/window_impl.cc",
234 "win/window_impl.h",
235 "x/x11_atom_cache.cc",
236 "x/x11_atom_cache.h",
237 "x/x11_error_tracker.cc",
238 "x/x11_error_tracker.h",
239 "x/x11_types.cc",
240 "x/x11_types.h",
241 ]
242
243 defines = [ "GFX_IMPLEMENTATION" ]
244
245 deps = [
246 "//base",
247 "//base:i18n",
248 "//base:base_static",
249 "//base/third_party/dynamic_annotations",
250 "//skia",
251 "//third_party/icu:icui18n",
252 "//third_party/icu:icuuc",
253 "//third_party/libpng",
254 "//third_party/zlib",
255 "//ui/gfx/geometry",
256 ]
257
258 # iOS.
259 if (is_ios) {
260 sources -= [
261 "codec/jpeg_codec.cc",
262 "codec/jpeg_codec.h",
263 ]
264 } else {
265 deps += [ "//third_party/libjpeg" ]
266 }
267
268 # Android.
269 if (is_android) {
270 sources -= [
271 "animation/throb_animation.cc",
272 "canvas_skia.cc"
273 "display_observer.cc",
274 "selection_model.cc",
275 ]
276
277 if (use_aura) {
278 sources -= [ "screen_android.cc" ]
279 } else {
280 sources -= [ "path.cc" ]
281 }
282
283 if (!is_android_webview_build) {
284 deps += [ "//base:base_java" ]
285 }
286
287 deps += [ ":jni_headers" ]
288 libs = [
289 "android",
290 "jnigraphics",
291 ]
292 }
293
294 if (is_android || is_ios) {
295 sources -= [
296 "render_text.cc",
297 "render_text.h",
298 "text_utils_skia.cc",
299 ]
300 }
301
302 # Windows.
303 if (is_win) {
304 cflags = [
305 "/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int.
306 "/wd4324", # Structure was padded due to __declspec(align()), which is
307 # uninteresting.
308 ]
309 } else {
310 sources -= [
311 "gdi_util.cc",
312 "gdi_util.h",
313 "icon_util.cc",
314 "icon_util.h",
315 ]
316 }
317
318 # Linux.
319 if (is_linux) {
320 configs += [ "//build/config/linux:fontconfig" ]
321 }
322
323 # Ozone stuff.
324 if (!use_ozone) {
325 sources -= [
326 "ozone/impl/file_surface_factory.cc",
327 "ozone/impl/file_surface_factory.h",
328 "ozone/surface_factory_ozone.cc",
329 "ozone/surface_factory_ozone.h",
330 "ozone/surface_ozone_base.cc",
331 "ozone/surface_ozone_base.h",
332 "ozone/surface_ozone.h",
333 "ozone/overlay_candidates_ozone.cc",
334 "ozone/overlay_candidates_ozone.h",
335 ]
336 }
337 if (ozone_platform_dri) {
338 configs += [ "//build/config/linux:dridrm" ]
339 } else {
340 sources -= [
341 "ozone/dri/dri_skbitmap.cc",
342 "ozone/dri/dri_skbitmap.h",
343 "ozone/dri/dri_surface.cc",
344 "ozone/dri/dri_surface.h",
345 "ozone/dri/dri_surface_factory.cc",
346 "ozone/dri/dri_surface_factory.h",
347 "ozone/dri/dri_vsync_provider.cc",
348 "ozone/dri/dri_vsync_provider.h",
349 "ozone/dri/dri_wrapper.cc",
350 "ozone/dri/dri_wrapper.h",
351 "ozone/dri/hardware_display_controller.cc",
352 "ozone/dri/hardware_display_controller.h",
353 ]
354 }
355
356 if (!use_aura) {
357 sources -= [
358 "nine_image_painter.cc",
359 "nine_image_painter.h",
360 ]
361 }
362 if (use_x11) {
363 configs += [ "//build/config/linux:x11" ]
364 }
365 if (use_pango) {
366 sources -= [
367 "platform_font_ozone.cc",
368 "render_text_ozone.cc",
369 ]
370 configs += [ "//build/config/linux:pangocairo" ]
371 }
372 }
373
374 source_set("gfx_test_support") {
375 sources = [
376 "test/gfx_util.cc",
377 "test/gfx_util.h",
378 "test/ui_cocoa_test_helper.h",
379 "test/ui_cocoa_test_helper.mm",
380 ]
381
382 deps = [
383 "//base",
384 "//skia",
385 "//testing/gtest",
386 ]
387
388 if (is_ios) {
389 # The cocoa files don't apply to iOS.
390 sources -= [
391 "test/ui_cocoa_test_helper.h",
392 "test/ui_cocoa_test_helper.mm",
393 ]
394 }
395 }
396
397 test("gfx_unittests") {
398 sources = [
399 "geometry/box_unittest.cc",
400 "geometry/cubic_bezier_unittest.cc",
401 "geometry/insets_unittest.cc",
402 "geometry/matrix3_unittest.cc",
403 "geometry/point_unittest.cc",
404 "geometry/point3_unittest.cc",
405 "geometry/quad_unittest.cc",
406 "geometry/rect_unittest.cc",
407 "geometry/safe_integer_conversions_unittest.cc",
408 "geometry/size_unittest.cc",
409 "geometry/vector2d_unittest.cc",
410 "geometry/vector3d_unittest.cc",
411 "range/range_unittest.cc",
412 ]
413
414 deps = [
415 ":gfx",
416 "//base",
417 "//base/test:run_all_unittests",
418 "//base/test:run_all_unittests",
419 "//testing/gtest",
420 "//ui/gfx/geometry",
421 ]
422 }
423
424 if (is_android) {
425 # TODO(brettw) gfx_jni_headers
426 }
OLDNEW
« no previous file with comments | « tools/gn/builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698