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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/BUILD.gn
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..206292951c4916d3e0d0e397c2e18aecf3709ee8
--- /dev/null
+++ b/ui/gfx/BUILD.gn
@@ -0,0 +1,426 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/ui.gni")
+if (is_android) {
+ import("//build/config/android/config.gni")
+}
+
+component("gfx") {
+ sources = [
+ "android/device_display_info.cc",
+ "android/device_display_info.h",
+ "android/gfx_jni_registrar.cc",
+ "android/gfx_jni_registrar.h",
+ "android/java_bitmap.cc",
+ "android/java_bitmap.h",
+ "android/scroller.cc",
+ "android/scroller.h",
+ "android/shared_device_display_info.cc",
+ "android/shared_device_display_info.h",
+ "android/view_configuration.cc",
+ "android/view_configuration.h",
+ "animation/animation.cc",
+ "animation/animation.h",
+ "animation/animation_container.cc",
+ "animation/animation_container.h",
+ "animation/animation_container_element.h",
+ "animation/animation_container_observer.h",
+ "animation/animation_delegate.h",
+ "animation/linear_animation.cc",
+ "animation/linear_animation.h",
+ "animation/multi_animation.cc",
+ "animation/multi_animation.h",
+ "animation/slide_animation.cc",
+ "animation/slide_animation.h",
+ "animation/throb_animation.cc",
+ "animation/throb_animation.h",
+ "animation/tween.cc",
+ "animation/tween.h",
+ "blit.cc",
+ "blit.h",
+ "break_list.h",
+ "canvas.cc",
+ "canvas.h",
+ "canvas_android.cc",
+ "canvas_paint_mac.h",
+ "canvas_paint_mac.mm",
+ "canvas_paint_win.cc",
+ "canvas_paint_win.h",
+ "canvas_skia.cc",
+ "canvas_skia_paint.h",
+ "codec/jpeg_codec.cc",
+ "codec/jpeg_codec.h",
+ "codec/png_codec.cc",
+ "codec/png_codec.h",
+ "color_analysis.cc",
+ "color_analysis.h",
+ "color_profile.cc",
+ "color_profile.h",
+ "color_profile_mac.cc",
+ "color_profile_win.cc",
+ "color_utils.cc",
+ "color_utils.h",
+ "display.cc",
+ "display.h",
+ "display_observer.cc",
+ "display_observer.h",
+ "favicon_size.cc",
+ "favicon_size.h",
+ "font.cc",
+ "font.h",
+ "font_fallback_win.cc",
+ "font_fallback_win.h",
+ "font_list.cc",
+ "font_list.h",
+ "font_list_impl.cc",
+ "font_list_impl.h",
+ "font_render_params_android.cc",
+ "font_render_params_linux.cc",
+ "font_render_params_linux.h",
+ "font_smoothing_win.cc",
+ "font_smoothing_win.h",
+ "frame_time.h",
+ "gdi_util.cc",
+ "gdi_util.h",
+ "gfx_export.h",
+ "gfx_paths.cc",
+ "gfx_paths.h",
+ "gpu_memory_buffer.cc",
+ "gpu_memory_buffer.h",
+ "icon_util.cc",
+ "icon_util.h",
+ "image/canvas_image_source.cc",
+ "image/canvas_image_source.h",
+ "image/image.cc",
+ "image/image.h",
+ "image/image_family.cc",
+ "image/image_family.h",
+ "image/image_ios.mm",
+ "image/image_mac.mm",
+ "image/image_png_rep.cc",
+ "image/image_png_rep.h",
+ "image/image_skia.cc",
+ "image/image_skia.h",
+ "image/image_skia_operations.cc",
+ "image/image_skia_operations.h",
+ "image/image_skia_rep.cc",
+ "image/image_skia_rep.h",
+ "image/image_skia_source.h",
+ "image/image_skia_util_ios.h",
+ "image/image_skia_util_ios.mm",
+ "image/image_skia_util_mac.h",
+ "image/image_skia_util_mac.mm",
+ "image/image_util.cc",
+ "image/image_util.h",
+ "image/image_util_ios.mm",
+ "interpolated_transform.cc",
+ "interpolated_transform.h",
+ "linux_font_delegate.cc",
+ "linux_font_delegate.h",
+ "mac/scoped_ns_disable_screen_updates.h",
+ "native_widget_types.h",
+ "nine_image_painter.cc",
+ "nine_image_painter.h",
+ "ozone/dri/dri_skbitmap.cc",
+ "ozone/dri/dri_skbitmap.h",
+ "ozone/dri/dri_surface.cc",
+ "ozone/dri/dri_surface.h",
+ "ozone/dri/dri_surface_factory.cc",
+ "ozone/dri/dri_surface_factory.h",
+ "ozone/dri/dri_vsync_provider.cc",
+ "ozone/dri/dri_vsync_provider.h",
+ "ozone/dri/dri_wrapper.cc",
+ "ozone/dri/dri_wrapper.h",
+ "ozone/dri/hardware_display_controller.cc",
+ "ozone/dri/hardware_display_controller.h",
+ "ozone/impl/file_surface_factory.cc",
+ "ozone/impl/file_surface_factory.h",
+ "ozone/surface_factory_ozone.cc",
+ "ozone/surface_factory_ozone.h",
+ "ozone/surface_ozone_base.cc",
+ "ozone/surface_ozone_base.h",
+ "ozone/surface_ozone.h",
+ "ozone/overlay_candidates_ozone.cc",
+ "ozone/overlay_candidates_ozone.h",
+ "pango_util.cc",
+ "pango_util.h",
+ "path.cc",
+ "path.h",
+ "path_aura.cc",
+ "path_win.cc",
+ "path_win.h",
+ "path_x11.cc",
+ "path_x11.h",
+ "platform_font.h",
+ "platform_font_android.cc",
+ "platform_font_ios.h",
+ "platform_font_ios.mm",
+ "platform_font_mac.h",
+ "platform_font_mac.mm",
+ "platform_font_ozone.cc",
+ "platform_font_pango.cc",
+ "platform_font_pango.h",
+ "platform_font_win.cc",
+ "platform_font_win.h",
+ "range/range.cc",
+ "range/range.h",
+ "range/range_mac.mm",
+ "range/range_win.cc",
+ "render_text.cc",
+ "render_text.h",
+ "render_text_mac.cc",
+ "render_text_mac.h",
+ "render_text_ozone.cc",
+ "render_text_pango.cc",
+ "render_text_pango.h",
+ "render_text_win.cc",
+ "render_text_win.h",
+ "scoped_canvas.h",
+ "scoped_cg_context_save_gstate_mac.h",
+ "scoped_ns_graphics_context_save_gstate_mac.h",
+ "scoped_ns_graphics_context_save_gstate_mac.mm",
+ "scoped_ui_graphics_push_context_ios.h",
+ "scoped_ui_graphics_push_context_ios.mm",
+ "screen.cc",
+ "screen.h",
+ "screen_android.cc",
+ "screen_aura.cc",
+ "screen_ios.mm",
+ "screen_mac.mm",
+ "screen_win.cc",
+ "screen_win.h",
+ "scrollbar_size.cc",
+ "scrollbar_size.h",
+ "selection_model.cc",
+ "selection_model.h",
+ "sequential_id_generator.cc",
+ "sequential_id_generator.h",
+ "shadow_value.cc",
+ "shadow_value.h",
+ "skbitmap_operations.cc",
+ "skbitmap_operations.h",
+ "skia_util.cc",
+ "skia_util.h",
+ "switches.cc",
+ "switches.h",
+ "sys_color_change_listener.cc",
+ "sys_color_change_listener.h",
+ "text_constants.h",
+ "text_elider.cc",
+ "text_elider.h",
+ "text_utils.cc",
+ "text_utils.h",
+ "text_utils_android.cc",
+ "text_utils_ios.mm",
+ "text_utils_skia.cc",
+ "transform.cc",
+ "transform.h",
+ "transform_util.cc",
+ "transform_util.h",
+ "ui_gfx_exports.cc",
+ "utf16_indexing.cc",
+ "utf16_indexing.h",
+ "vsync_provider.h",
+ "win/dpi.cc",
+ "win/dpi.h",
+ "win/hwnd_util.cc",
+ "win/hwnd_util.h",
+ "win/scoped_set_map_mode.h",
+ "win/singleton_hwnd.cc",
+ "win/singleton_hwnd.h",
+ "win/window_impl.cc",
+ "win/window_impl.h",
+ "x/x11_atom_cache.cc",
+ "x/x11_atom_cache.h",
+ "x/x11_error_tracker.cc",
+ "x/x11_error_tracker.h",
+ "x/x11_types.cc",
+ "x/x11_types.h",
+ ]
+
+ defines = [ "GFX_IMPLEMENTATION" ]
+
+ deps = [
+ "//base",
+ "//base:i18n",
+ "//base:base_static",
+ "//base/third_party/dynamic_annotations",
+ "//skia",
+ "//third_party/icu:icui18n",
+ "//third_party/icu:icuuc",
+ "//third_party/libpng",
+ "//third_party/zlib",
+ "//ui/gfx/geometry",
+ ]
+
+ # iOS.
+ if (is_ios) {
+ sources -= [
+ "codec/jpeg_codec.cc",
+ "codec/jpeg_codec.h",
+ ]
+ } else {
+ deps += [ "//third_party/libjpeg" ]
+ }
+
+ # Android.
+ if (is_android) {
+ sources -= [
+ "animation/throb_animation.cc",
+ "canvas_skia.cc"
+ "display_observer.cc",
+ "selection_model.cc",
+ ]
+
+ if (use_aura) {
+ sources -= [ "screen_android.cc" ]
+ } else {
+ sources -= [ "path.cc" ]
+ }
+
+ if (!is_android_webview_build) {
+ deps += [ "//base:base_java" ]
+ }
+
+ deps += [ ":jni_headers" ]
+ libs = [
+ "android",
+ "jnigraphics",
+ ]
+ }
+
+ if (is_android || is_ios) {
+ sources -= [
+ "render_text.cc",
+ "render_text.h",
+ "text_utils_skia.cc",
+ ]
+ }
+
+ # Windows.
+ if (is_win) {
+ cflags = [
+ "/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int.
+ "/wd4324", # Structure was padded due to __declspec(align()), which is
+ # uninteresting.
+ ]
+ } else {
+ sources -= [
+ "gdi_util.cc",
+ "gdi_util.h",
+ "icon_util.cc",
+ "icon_util.h",
+ ]
+ }
+
+ # Linux.
+ if (is_linux) {
+ configs += [ "//build/config/linux:fontconfig" ]
+ }
+
+ # Ozone stuff.
+ if (!use_ozone) {
+ sources -= [
+ "ozone/impl/file_surface_factory.cc",
+ "ozone/impl/file_surface_factory.h",
+ "ozone/surface_factory_ozone.cc",
+ "ozone/surface_factory_ozone.h",
+ "ozone/surface_ozone_base.cc",
+ "ozone/surface_ozone_base.h",
+ "ozone/surface_ozone.h",
+ "ozone/overlay_candidates_ozone.cc",
+ "ozone/overlay_candidates_ozone.h",
+ ]
+ }
+ if (ozone_platform_dri) {
+ configs += [ "//build/config/linux:dridrm" ]
+ } else {
+ sources -= [
+ "ozone/dri/dri_skbitmap.cc",
+ "ozone/dri/dri_skbitmap.h",
+ "ozone/dri/dri_surface.cc",
+ "ozone/dri/dri_surface.h",
+ "ozone/dri/dri_surface_factory.cc",
+ "ozone/dri/dri_surface_factory.h",
+ "ozone/dri/dri_vsync_provider.cc",
+ "ozone/dri/dri_vsync_provider.h",
+ "ozone/dri/dri_wrapper.cc",
+ "ozone/dri/dri_wrapper.h",
+ "ozone/dri/hardware_display_controller.cc",
+ "ozone/dri/hardware_display_controller.h",
+ ]
+ }
+
+ if (!use_aura) {
+ sources -= [
+ "nine_image_painter.cc",
+ "nine_image_painter.h",
+ ]
+ }
+ if (use_x11) {
+ configs += [ "//build/config/linux:x11" ]
+ }
+ if (use_pango) {
+ sources -= [
+ "platform_font_ozone.cc",
+ "render_text_ozone.cc",
+ ]
+ configs += [ "//build/config/linux:pangocairo" ]
+ }
+}
+
+source_set("gfx_test_support") {
+ sources = [
+ "test/gfx_util.cc",
+ "test/gfx_util.h",
+ "test/ui_cocoa_test_helper.h",
+ "test/ui_cocoa_test_helper.mm",
+ ]
+
+ deps = [
+ "//base",
+ "//skia",
+ "//testing/gtest",
+ ]
+
+ if (is_ios) {
+ # The cocoa files don't apply to iOS.
+ sources -= [
+ "test/ui_cocoa_test_helper.h",
+ "test/ui_cocoa_test_helper.mm",
+ ]
+ }
+}
+
+test("gfx_unittests") {
+ sources = [
+ "geometry/box_unittest.cc",
+ "geometry/cubic_bezier_unittest.cc",
+ "geometry/insets_unittest.cc",
+ "geometry/matrix3_unittest.cc",
+ "geometry/point_unittest.cc",
+ "geometry/point3_unittest.cc",
+ "geometry/quad_unittest.cc",
+ "geometry/rect_unittest.cc",
+ "geometry/safe_integer_conversions_unittest.cc",
+ "geometry/size_unittest.cc",
+ "geometry/vector2d_unittest.cc",
+ "geometry/vector3d_unittest.cc",
+ "range/range_unittest.cc",
+ ]
+
+ deps = [
+ ":gfx",
+ "//base",
+ "//base/test:run_all_unittests",
+ "//base/test:run_all_unittests",
+ "//testing/gtest",
+ "//ui/gfx/geometry",
+ ]
+}
+
+if (is_android) {
+ # TODO(brettw) gfx_jni_headers
+}
« 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