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.
5 import("//build/config/ui.gni")
7 import("//build/config/android/config.gni")
10 # Several targets want to include this header file, and some of them are
11 # child dependencies of "gfx". Therefore, we separate it out here so multiple
12 # targets can all have a dependency for header checking purposes without
13 # creating circular dependencies.
14 source_set("gfx_export") {
22 "android/device_display_info.cc",
23 "android/device_display_info.h",
24 "android/gfx_jni_registrar.cc",
25 "android/gfx_jni_registrar.h",
26 "android/java_bitmap.cc",
27 "android/java_bitmap.h",
28 "android/scroller.cc",
30 "android/shared_device_display_info.cc",
31 "android/shared_device_display_info.h",
32 "android/view_configuration.cc",
33 "android/view_configuration.h",
34 "animation/animation.cc",
35 "animation/animation.h",
36 "animation/animation_container.cc",
37 "animation/animation_container.h",
38 "animation/animation_container_element.h",
39 "animation/animation_container_observer.h",
40 "animation/animation_delegate.h",
41 "animation/linear_animation.cc",
42 "animation/linear_animation.h",
43 "animation/multi_animation.cc",
44 "animation/multi_animation.h",
45 "animation/slide_animation.cc",
46 "animation/slide_animation.h",
47 "animation/throb_animation.cc",
48 "animation/throb_animation.h",
58 "canvas_paint_mac.mm",
59 "canvas_paint_win.cc",
62 "canvas_skia_paint.h",
63 "codec/jpeg_codec.cc",
71 "color_profile_mac.cc",
72 "color_profile_win.cc",
77 "display_observer.cc",
83 "font_fallback_win.cc",
84 "font_fallback_win.h",
89 "font_render_params_android.cc",
90 "font_render_params_linux.cc",
91 "font_render_params_linux.h",
92 "font_smoothing_win.cc",
93 "font_smoothing_win.h",
99 "gpu_memory_buffer.cc",
100 "gpu_memory_buffer.h",
103 "image/canvas_image_source.cc",
104 "image/canvas_image_source.h",
107 "image/image_family.cc",
108 "image/image_family.h",
109 "image/image_ios.mm",
110 "image/image_mac.mm",
111 "image/image_png_rep.cc",
112 "image/image_png_rep.h",
113 "image/image_skia.cc",
114 "image/image_skia.h",
115 "image/image_skia_operations.cc",
116 "image/image_skia_operations.h",
117 "image/image_skia_rep.cc",
118 "image/image_skia_rep.h",
119 "image/image_skia_source.h",
120 "image/image_skia_util_ios.h",
121 "image/image_skia_util_ios.mm",
122 "image/image_skia_util_mac.h",
123 "image/image_skia_util_mac.mm",
124 "image/image_util.cc",
125 "image/image_util.h",
126 "image/image_util_ios.mm",
127 "interpolated_transform.cc",
128 "interpolated_transform.h",
129 "linux_font_delegate.cc",
130 "linux_font_delegate.h",
131 "mac/scoped_ns_disable_screen_updates.h",
132 "native_widget_types.h",
133 "nine_image_painter.cc",
134 "nine_image_painter.h",
135 "ozone/dri/dri_skbitmap.cc",
136 "ozone/dri/dri_skbitmap.h",
137 "ozone/dri/dri_surface.cc",
138 "ozone/dri/dri_surface.h",
139 "ozone/dri/dri_surface_factory.cc",
140 "ozone/dri/dri_surface_factory.h",
141 "ozone/dri/dri_vsync_provider.cc",
142 "ozone/dri/dri_vsync_provider.h",
143 "ozone/dri/dri_wrapper.cc",
144 "ozone/dri/dri_wrapper.h",
145 "ozone/dri/hardware_display_controller.cc",
146 "ozone/dri/hardware_display_controller.h",
147 "ozone/impl/file_surface_factory.cc",
148 "ozone/impl/file_surface_factory.h",
149 "ozone/surface_factory_ozone.cc",
150 "ozone/surface_factory_ozone.h",
151 "ozone/surface_ozone.h",
152 "ozone/overlay_candidates_ozone.cc",
153 "ozone/overlay_candidates_ozone.h",
164 "platform_font_android.cc",
165 "platform_font_ios.h",
166 "platform_font_ios.mm",
167 "platform_font_mac.h",
168 "platform_font_mac.mm",
169 "platform_font_ozone.cc",
170 "platform_font_pango.cc",
171 "platform_font_pango.h",
172 "platform_font_win.cc",
173 "platform_font_win.h",
176 "range/range_mac.mm",
177 "range/range_win.cc",
180 "render_text_mac.cc",
182 "render_text_ozone.cc",
183 "render_text_pango.cc",
184 "render_text_pango.h",
185 "render_text_win.cc",
188 "scoped_cg_context_save_gstate_mac.h",
189 "scoped_ns_graphics_context_save_gstate_mac.h",
190 "scoped_ns_graphics_context_save_gstate_mac.mm",
191 "scoped_ui_graphics_push_context_ios.h",
192 "scoped_ui_graphics_push_context_ios.mm",
203 "selection_model.cc",
205 "sequential_id_generator.cc",
206 "sequential_id_generator.h",
209 "skbitmap_operations.cc",
210 "skbitmap_operations.h",
215 "sys_color_change_listener.cc",
216 "sys_color_change_listener.h",
222 "text_utils_android.cc",
224 "text_utils_skia.cc",
237 "win/scoped_set_map_mode.h",
238 "win/singleton_hwnd.cc",
239 "win/singleton_hwnd.h",
240 "win/window_impl.cc",
244 defines = [ "GFX_IMPLEMENTATION" ]
250 "//base:base_static",
251 "//base/third_party/dynamic_annotations",
253 "//third_party/icu:icui18n",
254 "//third_party/icu:icuuc",
255 "//third_party/libpng",
256 "//third_party/zlib",
263 "codec/jpeg_codec.cc",
264 "codec/jpeg_codec.h",
267 deps += [ "//third_party:jpeg" ]
273 "animation/throb_animation.cc",
275 "display_observer.cc",
276 "selection_model.cc",
280 sources -= [ "screen_android.cc" ]
282 sources -= [ "path.cc" ]
285 if (!is_android_webview_build) {
286 deps += [ "//base:base_java" ]
289 deps += [ ":jni_headers" ]
296 if (is_android || is_ios) {
300 "text_utils_skia.cc",
307 "/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int.
308 "/wd4324", # Structure was padded due to __declspec(align()), which is
322 configs += [ "//build/config/linux:fontconfig" ]
328 "ozone/impl/file_surface_factory.cc",
329 "ozone/impl/file_surface_factory.h",
330 "ozone/surface_factory_ozone.cc",
331 "ozone/surface_factory_ozone.h",
332 "ozone/surface_ozone.h",
333 "ozone/overlay_candidates_ozone.cc",
334 "ozone/overlay_candidates_ozone.h",
337 if (ozone_platform_dri) {
338 configs += [ "//build/config/linux:dridrm" ]
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",
358 "nine_image_painter.cc",
359 "nine_image_painter.h",
376 "platform_font_ozone.cc",
377 "render_text_ozone.cc",
379 configs += [ "//build/config/linux:pangocairo" ]
384 "platform_font_pango.cc",
385 "platform_font_pango.h",
386 "render_text_pango.cc",
387 "render_text_pango.h",
392 component("gfx_geometry") {
396 "geometry/cubic_bezier.h",
397 "geometry/cubic_bezier.cc",
398 "geometry/insets.cc",
400 "geometry/insets_base.h",
401 "geometry/insets_f.cc",
402 "geometry/insets_f.h",
403 "geometry/matrix3_f.cc",
404 "geometry/matrix3_f.h",
407 "geometry/point3_f.cc",
408 "geometry/point3_f.h",
409 "geometry/point_base.h",
410 "geometry/point_conversions.cc",
411 "geometry/point_conversions.h",
412 "geometry/point_f.cc",
413 "geometry/point_f.h",
414 "geometry/quad_f.cc",
418 "geometry/rect_base.h",
419 "geometry/rect_base_impl.h",
420 "geometry/rect_conversions.cc",
421 "geometry/rect_conversions.h",
422 "geometry/rect_f.cc",
424 "geometry/r_tree.cc",
426 "geometry/safe_integer_conversions.h",
429 "geometry/size_base.h",
430 "geometry/size_conversions.cc",
431 "geometry/size_conversions.h",
432 "geometry/size_f.cc",
434 "geometry/vector2d.cc",
435 "geometry/vector2d.h",
436 "geometry/vector2d_conversions.cc",
437 "geometry/vector2d_conversions.h",
438 "geometry/vector2d_f.cc",
439 "geometry/vector2d_f.h",
440 "geometry/vector3d_f.cc",
441 "geometry/vector3d_f.h",
443 defines = [ "GFX_IMPLEMENTATION" ]
447 source_set("gfx_test_support") {
451 "test/ui_cocoa_test_helper.h",
452 "test/ui_cocoa_test_helper.mm",
457 "//base/test:test_support",
463 # The cocoa files don't apply to iOS.
465 "test/ui_cocoa_test_helper.h",
466 "test/ui_cocoa_test_helper.mm",
471 test("gfx_unittests") {
473 "geometry/box_unittest.cc",
474 "geometry/cubic_bezier_unittest.cc",
475 "geometry/insets_unittest.cc",
476 "geometry/matrix3_unittest.cc",
477 "geometry/point_unittest.cc",
478 "geometry/point3_unittest.cc",
479 "geometry/quad_unittest.cc",
480 "geometry/rect_unittest.cc",
481 "geometry/safe_integer_conversions_unittest.cc",
482 "geometry/size_unittest.cc",
483 "geometry/vector2d_unittest.cc",
484 "geometry/vector3d_unittest.cc",
485 "range/range_unittest.cc",
491 "//base/test:run_all_unittests",
492 "//base/test:run_all_unittests",
499 # TODO(brettw) gfx_jni_headers
503 component("gfx_x11") {
505 "x/x11_atom_cache.cc",
506 "x/x11_atom_cache.h",
507 "x/x11_error_tracker.cc",
508 "x/x11_error_tracker.h",
513 configs += [ "//build/config/linux:x11" ]