Chromium Code Reviews| OLD | NEW |
|---|---|
| (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("geometry") { | |
| 11 output_name = "gfx_geometry" | |
| 12 | |
| 13 sources = [ | |
| 14 "geometry/box_f.cc", | |
| 15 "geometry/box_f.h", | |
| 16 "geometry/cubic_bezier.h", | |
| 17 "geometry/cubic_bezier.cc", | |
| 18 "geometry/insets.cc", | |
| 19 "geometry/insets.h", | |
| 20 "geometry/insets_base.h", | |
| 21 "geometry/insets_f.cc", | |
| 22 "geometry/insets_f.h", | |
| 23 "geometry/matrix3_f.cc", | |
| 24 "geometry/matrix3_f.h", | |
| 25 "geometry/point.cc", | |
| 26 "geometry/point.h", | |
| 27 "geometry/point3_f.cc", | |
| 28 "geometry/point3_f.h", | |
| 29 "geometry/point_base.h", | |
| 30 "geometry/point_conversions.cc", | |
| 31 "geometry/point_conversions.h", | |
| 32 "geometry/point_f.cc", | |
| 33 "geometry/point_f.h", | |
| 34 "geometry/quad_f.cc", | |
| 35 "geometry/quad_f.h", | |
| 36 "geometry/rect.cc", | |
| 37 "geometry/rect.h", | |
| 38 "geometry/rect_base.h", | |
| 39 "geometry/rect_base_impl.h", | |
| 40 "geometry/rect_conversions.cc", | |
| 41 "geometry/rect_conversions.h", | |
| 42 "geometry/rect_f.cc", | |
| 43 "geometry/rect_f.h", | |
| 44 "geometry/safe_integer_conversions.h", | |
| 45 "geometry/size.cc", | |
| 46 "geometry/size.h", | |
| 47 "geometry/size_base.h", | |
| 48 "geometry/size_conversions.cc", | |
| 49 "geometry/size_conversions.h", | |
| 50 "geometry/size_f.cc", | |
| 51 "geometry/size_f.h", | |
| 52 "geometry/vector2d.cc", | |
| 53 "geometry/vector2d.h", | |
| 54 "geometry/vector2d_conversions.cc", | |
| 55 "geometry/vector2d_conversions.h", | |
| 56 "geometry/vector2d_f.cc", | |
| 57 "geometry/vector2d_f.h", | |
| 58 "geometry/vector3d_f.cc", | |
| 59 "geometry/vector3d_f.h", | |
| 60 ] | |
| 61 | |
| 62 defines = [ "GFX_IMPLEMENTATION" ] | |
| 63 | |
| 64 deps = [ | |
| 65 "//base", | |
| 66 ] | |
| 67 } | |
| 68 | |
| 69 component("gfx") { | |
| 70 sources = [ | |
| 71 "android/device_display_info.cc", | |
| 72 "android/device_display_info.h", | |
| 73 "android/gfx_jni_registrar.cc", | |
| 74 "android/gfx_jni_registrar.h", | |
| 75 "android/java_bitmap.cc", | |
| 76 "android/java_bitmap.h", | |
| 77 "android/scroller.cc", | |
| 78 "android/scroller.h", | |
| 79 "android/shared_device_display_info.cc", | |
| 80 "android/shared_device_display_info.h", | |
| 81 "android/view_configuration.cc", | |
| 82 "android/view_configuration.h", | |
| 83 "animation/animation.cc", | |
| 84 "animation/animation.h", | |
| 85 "animation/animation_container.cc", | |
| 86 "animation/animation_container.h", | |
| 87 "animation/animation_container_element.h", | |
| 88 "animation/animation_container_observer.h", | |
| 89 "animation/animation_delegate.h", | |
| 90 "animation/linear_animation.cc", | |
| 91 "animation/linear_animation.h", | |
| 92 "animation/multi_animation.cc", | |
| 93 "animation/multi_animation.h", | |
| 94 "animation/slide_animation.cc", | |
| 95 "animation/slide_animation.h", | |
| 96 "animation/throb_animation.cc", | |
| 97 "animation/throb_animation.h", | |
| 98 "animation/tween.cc", | |
| 99 "animation/tween.h", | |
| 100 "blit.cc", | |
| 101 "blit.h", | |
| 102 "break_list.h", | |
| 103 "canvas.cc", | |
| 104 "canvas.h", | |
| 105 "canvas_android.cc", | |
| 106 "canvas_paint_mac.h", | |
| 107 "canvas_paint_mac.mm", | |
| 108 "canvas_paint_win.cc", | |
| 109 "canvas_paint_win.h", | |
| 110 "canvas_skia.cc", | |
| 111 "canvas_skia_paint.h", | |
| 112 "codec/jpeg_codec.cc", | |
| 113 "codec/jpeg_codec.h", | |
| 114 "codec/png_codec.cc", | |
| 115 "codec/png_codec.h", | |
| 116 "color_analysis.cc", | |
| 117 "color_analysis.h", | |
| 118 "color_profile.cc", | |
| 119 "color_profile.h", | |
| 120 "color_profile_mac.cc", | |
| 121 "color_profile_win.cc", | |
| 122 "color_utils.cc", | |
| 123 "color_utils.h", | |
| 124 "display.cc", | |
| 125 "display.h", | |
| 126 "display_observer.cc", | |
| 127 "display_observer.h", | |
| 128 "favicon_size.cc", | |
| 129 "favicon_size.h", | |
| 130 "font.cc", | |
| 131 "font.h", | |
| 132 "font_fallback_win.cc", | |
| 133 "font_fallback_win.h", | |
| 134 "font_list.cc", | |
| 135 "font_list.h", | |
| 136 "font_list_impl.cc", | |
| 137 "font_list_impl.h", | |
| 138 "font_render_params_android.cc", | |
| 139 "font_render_params_linux.cc", | |
| 140 "font_render_params_linux.h", | |
| 141 "font_smoothing_win.cc", | |
| 142 "font_smoothing_win.h", | |
| 143 "frame_time.h", | |
| 144 "gdi_util.cc", | |
| 145 "gdi_util.h", | |
| 146 "gfx_export.h", | |
| 147 "gfx_paths.cc", | |
| 148 "gfx_paths.h", | |
| 149 "gpu_memory_buffer.cc", | |
| 150 "gpu_memory_buffer.h", | |
| 151 "icon_util.cc", | |
| 152 "icon_util.h", | |
| 153 "image/canvas_image_source.cc", | |
| 154 "image/canvas_image_source.h", | |
| 155 "image/image.cc", | |
| 156 "image/image.h", | |
| 157 "image/image_family.cc", | |
| 158 "image/image_family.h", | |
| 159 "image/image_ios.mm", | |
| 160 "image/image_mac.mm", | |
| 161 "image/image_png_rep.cc", | |
| 162 "image/image_png_rep.h", | |
| 163 "image/image_skia.cc", | |
| 164 "image/image_skia.h", | |
| 165 "image/image_skia_operations.cc", | |
| 166 "image/image_skia_operations.h", | |
| 167 "image/image_skia_rep.cc", | |
| 168 "image/image_skia_rep.h", | |
| 169 "image/image_skia_source.h", | |
| 170 "image/image_skia_util_ios.h", | |
| 171 "image/image_skia_util_ios.mm", | |
| 172 "image/image_skia_util_mac.h", | |
| 173 "image/image_skia_util_mac.mm", | |
| 174 "image/image_util.cc", | |
| 175 "image/image_util.h", | |
| 176 "image/image_util_ios.mm", | |
| 177 "interpolated_transform.cc", | |
| 178 "interpolated_transform.h", | |
| 179 "linux_font_delegate.cc", | |
| 180 "linux_font_delegate.h", | |
| 181 "mac/scoped_ns_disable_screen_updates.h", | |
| 182 "native_widget_types.h", | |
| 183 "nine_image_painter.cc", | |
| 184 "nine_image_painter.h", | |
| 185 "ozone/dri/dri_skbitmap.cc", | |
| 186 "ozone/dri/dri_skbitmap.h", | |
| 187 "ozone/dri/dri_surface.cc", | |
| 188 "ozone/dri/dri_surface.h", | |
| 189 "ozone/dri/dri_surface_factory.cc", | |
| 190 "ozone/dri/dri_surface_factory.h", | |
| 191 "ozone/dri/dri_vsync_provider.cc", | |
| 192 "ozone/dri/dri_vsync_provider.h", | |
| 193 "ozone/dri/dri_wrapper.cc", | |
| 194 "ozone/dri/dri_wrapper.h", | |
| 195 "ozone/dri/hardware_display_controller.cc", | |
| 196 "ozone/dri/hardware_display_controller.h", | |
| 197 "ozone/impl/file_surface_factory.cc", | |
| 198 "ozone/impl/file_surface_factory.h", | |
| 199 "ozone/surface_factory_ozone.cc", | |
| 200 "ozone/surface_factory_ozone.h", | |
| 201 "ozone/surface_ozone_base.cc", | |
| 202 "ozone/surface_ozone_base.h", | |
| 203 "ozone/surface_ozone.h", | |
| 204 "ozone/overlay_candidates_ozone.cc", | |
| 205 "ozone/overlay_candidates_ozone.h", | |
| 206 "pango_util.cc", | |
| 207 "pango_util.h", | |
| 208 "path.cc", | |
| 209 "path.h", | |
| 210 "path_aura.cc", | |
| 211 #"path_gtk.cc", | |
|
bradn
2014/04/03 23:27:18
?
brettw
2014/04/04 16:52:49
I just deleted these.
| |
| 212 "path_win.cc", | |
| 213 "path_win.h", | |
| 214 "path_x11.cc", | |
| 215 "path_x11.h", | |
| 216 "platform_font.h", | |
| 217 "platform_font_android.cc", | |
| 218 "platform_font_ios.h", | |
| 219 "platform_font_ios.mm", | |
| 220 "platform_font_mac.h", | |
| 221 "platform_font_mac.mm", | |
| 222 "platform_font_ozone.cc", | |
| 223 "platform_font_pango.cc", | |
| 224 "platform_font_pango.h", | |
| 225 "platform_font_win.cc", | |
| 226 "platform_font_win.h", | |
| 227 "range/range.cc", | |
| 228 "range/range.h", | |
| 229 "range/range_mac.mm", | |
| 230 "range/range_win.cc", | |
| 231 "render_text.cc", | |
| 232 "render_text.h", | |
| 233 "render_text_mac.cc", | |
| 234 "render_text_mac.h", | |
| 235 "render_text_ozone.cc", | |
| 236 "render_text_pango.cc", | |
| 237 "render_text_pango.h", | |
| 238 "render_text_win.cc", | |
| 239 "render_text_win.h", | |
| 240 "scoped_canvas.h", | |
| 241 "scoped_cg_context_save_gstate_mac.h", | |
| 242 "scoped_ns_graphics_context_save_gstate_mac.h", | |
| 243 "scoped_ns_graphics_context_save_gstate_mac.mm", | |
| 244 "scoped_ui_graphics_push_context_ios.h", | |
| 245 "scoped_ui_graphics_push_context_ios.mm", | |
| 246 "screen.cc", | |
| 247 "screen.h", | |
| 248 "screen_android.cc", | |
| 249 "screen_aura.cc", | |
| 250 #"screen_gtk.cc", | |
| 251 "screen_ios.mm", | |
| 252 "screen_mac.mm", | |
| 253 "screen_win.cc", | |
| 254 "screen_win.h", | |
| 255 "scrollbar_size.cc", | |
| 256 "scrollbar_size.h", | |
| 257 "selection_model.cc", | |
| 258 "selection_model.h", | |
| 259 "sequential_id_generator.cc", | |
| 260 "sequential_id_generator.h", | |
| 261 "shadow_value.cc", | |
| 262 "shadow_value.h", | |
| 263 "skbitmap_operations.cc", | |
| 264 "skbitmap_operations.h", | |
| 265 "skia_util.cc", | |
| 266 "skia_util.h", | |
| 267 #"skia_utils_gtk.cc", | |
| 268 #"skia_utils_gtk.h", | |
| 269 "switches.cc", | |
| 270 "switches.h", | |
| 271 "sys_color_change_listener.cc", | |
| 272 "sys_color_change_listener.h", | |
| 273 "text_constants.h", | |
| 274 "text_elider.cc", | |
| 275 "text_elider.h", | |
| 276 "text_utils.cc", | |
| 277 "text_utils.h", | |
| 278 "text_utils_android.cc", | |
| 279 "text_utils_ios.mm", | |
| 280 "text_utils_skia.cc", | |
| 281 "transform.cc", | |
| 282 "transform.h", | |
| 283 "transform_util.cc", | |
| 284 "transform_util.h", | |
| 285 "ui_gfx_exports.cc", | |
| 286 "utf16_indexing.cc", | |
| 287 "utf16_indexing.h", | |
| 288 "vsync_provider.h", | |
| 289 "win/dpi.cc", | |
| 290 "win/dpi.h", | |
| 291 "win/hwnd_util.cc", | |
| 292 "win/hwnd_util.h", | |
| 293 "win/scoped_set_map_mode.h", | |
| 294 "win/singleton_hwnd.cc", | |
| 295 "win/singleton_hwnd.h", | |
| 296 "win/window_impl.cc", | |
| 297 "win/window_impl.h", | |
| 298 "x/x11_atom_cache.cc", | |
| 299 "x/x11_atom_cache.h", | |
| 300 "x/x11_error_tracker.cc", | |
| 301 "x/x11_error_tracker.h", | |
| 302 "x/x11_types.cc", | |
| 303 "x/x11_types.h", | |
| 304 ] | |
| 305 | |
| 306 defines = [ "GFX_IMPLEMENTATION" ] | |
| 307 | |
| 308 deps = [ | |
| 309 ":geometry", | |
| 310 "//base", | |
| 311 "//base:base_i18n", | |
| 312 "//base:base_static", | |
| 313 "//base/third_party/dynamic_annotations", | |
| 314 "//skia", | |
| 315 "//third_party/icu:icui18n", | |
| 316 "//third_party/icu:icuuc", | |
| 317 "//third_party/libpng", | |
| 318 "//third_party/zlib", | |
| 319 ] | |
| 320 | |
| 321 # iOS. | |
| 322 if (is_ios) { | |
| 323 sources -= [ | |
| 324 "codec/jpeg_codec.cc", | |
| 325 "codec/jpeg_codec.h", | |
| 326 ] | |
| 327 } else { | |
| 328 deps += [ "//third_party/libjpeg" ] | |
| 329 } | |
| 330 | |
| 331 # Android. | |
| 332 if (is_android) { | |
| 333 sources -= [ | |
| 334 "animation/throb_animation.cc", | |
| 335 "canvas_skia.cc" | |
| 336 "display_observer.cc", | |
| 337 "selection_model.cc", | |
| 338 ] | |
| 339 | |
| 340 if (use_aura) { | |
| 341 sources -= [ "screen_android.cc" ] | |
| 342 } else { | |
| 343 sources -= [ "path.cc" ] | |
| 344 } | |
| 345 | |
| 346 if (!is_android_webview_build) { | |
| 347 deps += [ "//base:base_java" ] | |
| 348 } | |
| 349 | |
| 350 deps += [ ":jni_headers" ] | |
| 351 libs = [ | |
| 352 "android", | |
| 353 "jnigraphics", | |
| 354 ] | |
| 355 } | |
| 356 | |
| 357 if (is_android || is_ios) { | |
| 358 sources -= [ | |
| 359 "render_text.cc", | |
| 360 "render_text.h", | |
| 361 "text_utils_skia.cc", | |
| 362 ] | |
| 363 } | |
| 364 | |
| 365 # Windows. | |
| 366 if (is_win) { | |
| 367 cflags = [ | |
| 368 "/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int. | |
| 369 "/wd4324", # Structure was padded due to __declspec(align()), which is | |
| 370 # uninteresting. | |
| 371 ] | |
| 372 } else { | |
| 373 sources -= [ | |
| 374 "gdi_util.cc", | |
| 375 "gdi_util.h", | |
| 376 "icon_util.cc", | |
| 377 "icon_util.h", | |
| 378 ] | |
| 379 } | |
| 380 | |
| 381 # Linux. | |
| 382 if (is_linux) { | |
| 383 configs += [ "//build/config/linux:fontconfig" ] | |
| 384 } | |
| 385 | |
| 386 # Ozone stuff. | |
| 387 if (!use_ozone) { | |
| 388 sources -= [ | |
| 389 "ozone/impl/file_surface_factory.cc", | |
| 390 "ozone/impl/file_surface_factory.h", | |
| 391 "ozone/surface_factory_ozone.cc", | |
| 392 "ozone/surface_factory_ozone.h", | |
| 393 "ozone/surface_ozone_base.cc", | |
| 394 "ozone/surface_ozone_base.h", | |
| 395 "ozone/surface_ozone.h", | |
| 396 "ozone/overlay_candidates_ozone.cc", | |
| 397 "ozone/overlay_candidates_ozone.h", | |
| 398 ] | |
| 399 } | |
| 400 if (ozone_platform_dri) { | |
| 401 configs += [ "//build/config/linux:dridrm" ] | |
| 402 } else { | |
| 403 sources -= [ | |
| 404 "ozone/dri/dri_skbitmap.cc", | |
| 405 "ozone/dri/dri_skbitmap.h", | |
| 406 "ozone/dri/dri_surface.cc", | |
| 407 "ozone/dri/dri_surface.h", | |
| 408 "ozone/dri/dri_surface_factory.cc", | |
| 409 "ozone/dri/dri_surface_factory.h", | |
| 410 "ozone/dri/dri_vsync_provider.cc", | |
| 411 "ozone/dri/dri_vsync_provider.h", | |
| 412 "ozone/dri/dri_wrapper.cc", | |
| 413 "ozone/dri/dri_wrapper.h", | |
| 414 "ozone/dri/hardware_display_controller.cc", | |
| 415 "ozone/dri/hardware_display_controller.h", | |
| 416 ] | |
| 417 } | |
| 418 | |
| 419 if (!use_aura) { | |
| 420 sources -= [ | |
| 421 "nine_image_painter.cc", | |
| 422 "nine_image_painter.h", | |
| 423 ] | |
| 424 } | |
| 425 if (use_x11) { | |
| 426 configs += [ "//build/config/linux:x11" ] | |
| 427 } | |
| 428 if (use_pango) { | |
| 429 sources -= [ | |
| 430 "platform_font_ozone.cc", | |
| 431 "render_text_ozone.cc", | |
| 432 ] | |
| 433 configs += [ "//build/config/linux:pangocairo" ] | |
| 434 } | |
| 435 } | |
| 436 | |
| 437 source_set("test_support") { | |
| 438 sources = [ | |
| 439 "test/gfx_util.cc", | |
| 440 "test/gfx_util.h", | |
| 441 "test/ui_cocoa_test_helper.h", | |
| 442 "test/ui_cocoa_test_helper.mm", | |
| 443 ] | |
| 444 | |
| 445 deps = [ | |
| 446 "//base", | |
| 447 "//skia", | |
| 448 "//testing/gtest", | |
| 449 ] | |
| 450 | |
| 451 if (is_ios) { | |
| 452 # The cocoa files don't apply to iOS. | |
| 453 sources -= [ | |
| 454 "test/ui_cocoa_test_helper.h", | |
| 455 "test/ui_cocoa_test_helper.mm", | |
| 456 ] | |
| 457 } | |
| 458 } | |
| 459 | |
| 460 test("gfx_unittests") { | |
| 461 sources = [ | |
| 462 "geometry/box_unittest.cc", | |
| 463 "geometry/cubic_bezier_unittest.cc", | |
| 464 "geometry/insets_unittest.cc", | |
| 465 "geometry/matrix3_unittest.cc", | |
| 466 "geometry/point_unittest.cc", | |
| 467 "geometry/point3_unittest.cc", | |
| 468 "geometry/quad_unittest.cc", | |
| 469 "geometry/rect_unittest.cc", | |
| 470 "geometry/safe_integer_conversions_unittest.cc", | |
| 471 "geometry/size_unittest.cc", | |
| 472 "geometry/vector2d_unittest.cc", | |
| 473 "geometry/vector3d_unittest.cc", | |
| 474 "range/range_unittest.cc", | |
| 475 ] | |
| 476 | |
| 477 deps = [ | |
| 478 ":gfx", | |
| 479 ":geometry", | |
| 480 "//base", | |
| 481 "//base/test:run_all_unittests", | |
| 482 "//base/test:run_all_unittests", | |
| 483 "//testing/gtest", | |
| 484 ] | |
| 485 } | |
| 486 | |
| 487 if (is_android) { | |
| 488 # TODO(brettw) gfx_jni_headers | |
| 489 } | |
| OLD | NEW |