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