1# Copyright (c) 2013 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': 'gfx_geometry', 12 'type': '<(component)', 13 'dependencies': [ 14 '<(DEPTH)/base/base.gyp:base', 15 ], 16 'defines': [ 17 'GFX_IMPLEMENTATION', 18 ], 19 'sources': [ 20 'geometry/box_f.cc', 21 'geometry/box_f.h', 22 'geometry/cubic_bezier.h', 23 'geometry/cubic_bezier.cc', 24 'geometry/insets.cc', 25 'geometry/insets.h', 26 'geometry/insets_base.h', 27 'geometry/insets_f.cc', 28 'geometry/insets_f.h', 29 'geometry/matrix3_f.cc', 30 'geometry/matrix3_f.h', 31 'geometry/point.cc', 32 'geometry/point.h', 33 'geometry/point3_f.cc', 34 'geometry/point3_f.h', 35 'geometry/point_base.h', 36 'geometry/point_conversions.cc', 37 'geometry/point_conversions.h', 38 'geometry/point_f.cc', 39 'geometry/point_f.h', 40 'geometry/quad_f.cc', 41 'geometry/quad_f.h', 42 'geometry/rect.cc', 43 'geometry/rect.h', 44 'geometry/rect_base.h', 45 'geometry/rect_base_impl.h', 46 'geometry/rect_conversions.cc', 47 'geometry/rect_conversions.h', 48 'geometry/rect_f.cc', 49 'geometry/rect_f.h', 50 'geometry/r_tree.h', 51 'geometry/r_tree_base.cc', 52 'geometry/r_tree_base.h', 53 'geometry/safe_integer_conversions.h', 54 'geometry/size.cc', 55 'geometry/size.h', 56 'geometry/size_base.h', 57 'geometry/size_conversions.cc', 58 'geometry/size_conversions.h', 59 'geometry/size_f.cc', 60 'geometry/size_f.h', 61 'geometry/vector2d.cc', 62 'geometry/vector2d.h', 63 'geometry/vector2d_conversions.cc', 64 'geometry/vector2d_conversions.h', 65 'geometry/vector2d_f.cc', 66 'geometry/vector2d_f.h', 67 'geometry/vector3d_f.cc', 68 'geometry/vector3d_f.h', 69 ], 70 }, 71 { 72 'target_name': 'gfx', 73 'type': '<(component)', 74 'dependencies': [ 75 '<(DEPTH)/base/base.gyp:base', 76 '<(DEPTH)/base/base.gyp:base_i18n', 77 '<(DEPTH)/base/base.gyp:base_static', 78 '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 79 '<(DEPTH)/skia/skia.gyp:skia', 80 '<(DEPTH)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng', 81 '<(DEPTH)/third_party/icu/icu.gyp:icui18n', 82 '<(DEPTH)/third_party/icu/icu.gyp:icuuc', 83 '<(DEPTH)/third_party/libpng/libpng.gyp:libpng', 84 '<(DEPTH)/third_party/zlib/zlib.gyp:zlib', 85 'gfx_geometry', 86 ], 87 # text_elider.h includes ICU headers. 88 'export_dependent_settings': [ 89 '<(DEPTH)/skia/skia.gyp:skia', 90 '<(DEPTH)/third_party/icu/icu.gyp:icui18n', 91 '<(DEPTH)/third_party/icu/icu.gyp:icuuc', 92 ], 93 'defines': [ 94 'GFX_IMPLEMENTATION', 95 ], 96 'include_dirs': [ 97 '<(DEPTH)/third_party/icu/source/common' 98 ], 99 'sources': [ 100 'android/device_display_info.cc', 101 'android/device_display_info.h', 102 'android/gfx_jni_registrar.cc', 103 'android/gfx_jni_registrar.h', 104 'android/java_bitmap.cc', 105 'android/java_bitmap.h', 106 'android/scroller.cc', 107 'android/scroller.h', 108 'android/shared_device_display_info.cc', 109 'android/shared_device_display_info.h', 110 'android/view_configuration.cc', 111 'android/view_configuration.h', 112 'animation/animation.cc', 113 'animation/animation.h', 114 'animation/animation_container.cc', 115 'animation/animation_container.h', 116 'animation/animation_container_element.h', 117 'animation/animation_container_observer.h', 118 'animation/animation_delegate.h', 119 'animation/linear_animation.cc', 120 'animation/linear_animation.h', 121 'animation/multi_animation.cc', 122 'animation/multi_animation.h', 123 'animation/slide_animation.cc', 124 'animation/slide_animation.h', 125 'animation/throb_animation.cc', 126 'animation/throb_animation.h', 127 'animation/tween.cc', 128 'animation/tween.h', 129 'blit.cc', 130 'blit.h', 131 'break_list.h', 132 'canvas.cc', 133 'canvas.h', 134 'canvas_notimplemented.cc', 135 'canvas_paint_mac.h', 136 'canvas_paint_mac.mm', 137 'canvas_paint_win.cc', 138 'canvas_paint_win.h', 139 'canvas_skia.cc', 140 'canvas_skia_paint.h', 141 'codec/jpeg_codec.cc', 142 'codec/jpeg_codec.h', 143 'codec/png_codec.cc', 144 'codec/png_codec.h', 145 'color_analysis.cc', 146 'color_analysis.h', 147 'color_profile.cc', 148 'color_profile.h', 149 'color_profile_mac.mm', 150 'color_profile_win.cc', 151 'color_utils.cc', 152 'color_utils.h', 153 'display.cc', 154 'display.h', 155 'display_change_notifier.cc', 156 'display_change_notifier.h', 157 'display_observer.cc', 158 'display_observer.h', 159 'favicon_size.cc', 160 'favicon_size.h', 161 'font.cc', 162 'font.h', 163 'font_fallback.h', 164 'font_fallback_linux.cc', 165 'font_fallback_mac.cc', 166 'font_fallback_win.cc', 167 'font_fallback_win.h', 168 'font_list.cc', 169 'font_list.h', 170 'font_list_impl.cc', 171 'font_list_impl.h', 172 'font_render_params.cc', 173 'font_render_params.h', 174 'font_render_params_android.cc', 175 'font_render_params_linux.cc', 176 'font_render_params_mac.cc', 177 'font_render_params_win.cc', 178 'frame_time.h', 179 'gfx_export.h', 180 'gfx_paths.cc', 181 'gfx_paths.h', 182 'gpu_memory_buffer.cc', 183 'gpu_memory_buffer.h', 184 'image/canvas_image_source.cc', 185 'image/canvas_image_source.h', 186 'image/image.cc', 187 'image/image.h', 188 'image/image_family.cc', 189 'image/image_family.h', 190 'image/image_ios.mm', 191 'image/image_mac.mm', 192 'image/image_png_rep.cc', 193 'image/image_png_rep.h', 194 'image/image_skia.cc', 195 'image/image_skia.h', 196 'image/image_skia_operations.cc', 197 'image/image_skia_operations.h', 198 'image/image_skia_rep.cc', 199 'image/image_skia_rep.h', 200 'image/image_skia_source.h', 201 'image/image_skia_util_ios.h', 202 'image/image_skia_util_ios.mm', 203 'image/image_skia_util_mac.h', 204 'image/image_skia_util_mac.mm', 205 'image/image_util.cc', 206 'image/image_util.h', 207 'image/image_util_ios.mm', 208 'interpolated_transform.cc', 209 'interpolated_transform.h', 210 'linux_font_delegate.cc', 211 'linux_font_delegate.h', 212 'mac/coordinate_conversion.h', 213 'mac/coordinate_conversion.mm', 214 'mac/scoped_ns_disable_screen_updates.h', 215 'native_widget_types.h', 216 'nine_image_painter.cc', 217 'nine_image_painter.h', 218 'overlay_transform.h', 219 'pango_util.cc', 220 'pango_util.h', 221 'path.cc', 222 'path.h', 223 'path_aura.cc', 224 'path_win.cc', 225 'path_win.h', 226 'path_x11.cc', 227 'path_x11.h', 228 'platform_font.h', 229 'platform_font_android.cc', 230 'platform_font_ios.h', 231 'platform_font_ios.mm', 232 'platform_font_mac.h', 233 'platform_font_mac.mm', 234 'platform_font_ozone.cc', 235 'platform_font_pango.cc', 236 'platform_font_pango.h', 237 'platform_font_win.cc', 238 'platform_font_win.h', 239 'range/range.cc', 240 'range/range.h', 241 'range/range_mac.mm', 242 'range/range_win.cc', 243 'render_text.cc', 244 'render_text.h', 245 'render_text_harfbuzz.cc', 246 'render_text_harfbuzz.h', 247 'render_text_mac.cc', 248 'render_text_mac.h', 249 'render_text_ozone.cc', 250 'render_text_pango.cc', 251 'render_text_pango.h', 252 'render_text_win.cc', 253 'render_text_win.h', 254 'scoped_canvas.h', 255 'scoped_cg_context_save_gstate_mac.h', 256 'scoped_ns_graphics_context_save_gstate_mac.h', 257 'scoped_ns_graphics_context_save_gstate_mac.mm', 258 'scoped_ui_graphics_push_context_ios.h', 259 'scoped_ui_graphics_push_context_ios.mm', 260 'screen.cc', 261 'screen.h', 262 'screen_android.cc', 263 'screen_aura.cc', 264 'screen_ios.mm', 265 'screen_mac.mm', 266 'screen_win.cc', 267 'screen_win.h', 268 'scrollbar_size.cc', 269 'scrollbar_size.h', 270 'selection_model.cc', 271 'selection_model.h', 272 'sequential_id_generator.cc', 273 'sequential_id_generator.h', 274 'shadow_value.cc', 275 'shadow_value.h', 276 'skbitmap_operations.cc', 277 'skbitmap_operations.h', 278 'skia_util.cc', 279 'skia_util.h', 280 'switches.cc', 281 'switches.h', 282 'sys_color_change_listener.cc', 283 'sys_color_change_listener.h', 284 'text_constants.h', 285 'text_elider.cc', 286 'text_elider.h', 287 'text_utils.cc', 288 'text_utils.h', 289 'text_utils_android.cc', 290 'text_utils_ios.mm', 291 'text_utils_skia.cc', 292 'transform.cc', 293 'transform.h', 294 'transform_util.cc', 295 'transform_util.h', 296 'ui_gfx_exports.cc', 297 'utf16_indexing.cc', 298 'utf16_indexing.h', 299 'vsync_provider.h', 300 'win/dpi.cc', 301 'win/dpi.h', 302 'win/hwnd_util.cc', 303 'win/hwnd_util.h', 304 'win/scoped_set_map_mode.h', 305 'win/singleton_hwnd.cc', 306 'win/singleton_hwnd.h', 307 'win/window_impl.cc', 308 'win/window_impl.h', 309 ], 310 'conditions': [ 311 ['OS=="ios"', { 312 'dependencies': [ 313 '<(DEPTH)/ui/ios/ui_ios.gyp:ui_ios', 314 ], 315 # iOS only uses a subset of UI. 316 'sources/': [ 317 ['exclude', '^codec/jpeg_codec\\.cc$'], 318 ], 319 }, { 320 'dependencies': [ 321 '<(libjpeg_gyp_path):libjpeg', 322 ], 323 }], 324 # TODO(asvitkine): Switch all platforms to use canvas_skia.cc. 325 # http://crbug.com/105550 326 ['use_canvas_skia==1', { 327 'sources!': [ 328 'canvas_notimplemented.cc', 329 ], 330 }, { # use_canvas_skia!=1 331 'sources!': [ 332 'canvas_skia.cc', 333 ], 334 }], 335 ['OS=="win"', { 336 'sources': [ 337 'gdi_util.cc', 338 'gdi_util.h', 339 'icon_util.cc', 340 'icon_util.h', 341 ], 342 # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int 343 # C4324 is structure was padded due to __declspec(align()), which is 344 # uninteresting. 345 'msvs_disabled_warnings': [ 4267, 4324 ], 346 }], 347 ['OS=="android"', { 348 'sources!': [ 349 'animation/throb_animation.cc', 350 'display_observer.cc', 351 'selection_model.cc', 352 ], 353 'dependencies': [ 354 'gfx_jni_headers', 355 ], 356 'link_settings': { 357 'libraries': [ 358 '-landroid', 359 '-ljnigraphics', 360 ], 361 }, 362 }], 363 ['use_aura==0 and toolkit_views==0', { 364 'sources!': [ 365 'nine_image_painter.cc', 366 'nine_image_painter.h', 367 ], 368 }], 369 ['OS=="android" and use_aura==0', { 370 'sources!': [ 371 'path.cc', 372 ], 373 }], 374 ['OS=="android" and use_aura==1', { 375 'sources!': [ 376 'screen_android.cc', 377 ], 378 }], 379 ['OS=="android" and android_webview_build==0', { 380 'dependencies': [ 381 '<(DEPTH)/base/base.gyp:base_java', 382 ], 383 }], 384 ['OS=="android" or OS=="ios"', { 385 'sources!': [ 386 'render_text.cc', 387 'render_text.h', 388 'render_text_harfbuzz.cc', 389 'render_text_harfbuzz.h', 390 'text_utils_skia.cc', 391 ], 392 }], 393 ['use_x11==1', { 394 'dependencies': [ 395 '../../build/linux/system.gyp:x11', 396 'x/gfx_x11.gyp:gfx_x11', 397 ], 398 }], 399 ['use_pango==1', { 400 'dependencies': [ 401 '<(DEPTH)/build/linux/system.gyp:pangocairo', 402 ], 403 'sources!': [ 404 'platform_font_ozone.cc', 405 'render_text_ozone.cc', 406 ], 407 }], 408 ['desktop_linux==1 or chromeos==1', { 409 'dependencies': [ 410 # font_render_params_linux.cc uses fontconfig 411 '<(DEPTH)/build/linux/system.gyp:fontconfig', 412 ], 413 }], 414 ], 415 'target_conditions': [ 416 # Need 'target_conditions' to override default filename_rules to include 417 # the file on iOS. 418 ['OS == "ios"', { 419 'sources/': [ 420 ['include', '^scoped_cg_context_save_gstate_mac\\.h$'], 421 ], 422 }], 423 ], 424 }, 425 { 426 'target_name': 'gfx_test_support', 427 'type': 'static_library', 428 'sources': [ 429 'image/image_unittest_util.cc', 430 'image/image_unittest_util.h', 431 'image/image_unittest_util_ios.mm', 432 'image/image_unittest_util_mac.mm', 433 'test/fontconfig_util_linux.cc', 434 'test/fontconfig_util_linux.h', 435 'test/gfx_util.cc', 436 'test/gfx_util.h', 437 'test/ui_cocoa_test_helper.h', 438 'test/ui_cocoa_test_helper.mm', 439 ], 440 'dependencies': [ 441 '../../base/base.gyp:base', 442 '../../skia/skia.gyp:skia', 443 '../../testing/gtest.gyp:gtest', 444 ], 445 'conditions': [ 446 ['OS == "mac"', { 447 'link_settings': { 448 'libraries': [ 449 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', 450 ], 451 }, 452 }], 453 ['OS=="ios"', { 454 # The cocoa files don't apply to iOS. 455 'sources/': [ 456 ['exclude', 'cocoa'] 457 ], 458 }], 459 ['OS=="linux"', { 460 'dependencies': [ 461 '../../build/linux/system.gyp:fontconfig', 462 ], 463 }], 464 ], 465 }, 466 ], 467 'conditions': [ 468 ['OS=="android"' , { 469 'targets': [ 470 { 471 'target_name': 'gfx_jni_headers', 472 'type': 'none', 473 'sources': [ 474 '../android/java/src/org/chromium/ui/gfx/BitmapHelper.java', 475 '../android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java', 476 '../android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java', 477 ], 478 'variables': { 479 'jni_gen_package': 'ui/gfx', 480 }, 481 'includes': [ '../../build/jni_generator.gypi' ], 482 }, 483 ], 484 }], 485 ], 486} 487