Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / ui / gfx / BUILD.gn
index e2796a1..6e2de84 100644 (file)
@@ -8,9 +8,6 @@ if (is_android) {
   import("//build/config/android/config.gni")
   import("//build/config/android/rules.gni")
 }
-if (use_ozone) {
-  import("//ui/ozone/ozone.gni")
-}
 
 # Several targets want to include this header file, and some of them are
 # child dependencies of "gfx". Therefore, we separate it out here so multiple
@@ -58,7 +55,7 @@ component("gfx") {
     "break_list.h",
     "canvas.cc",
     "canvas.h",
-    "canvas_android.cc",
+    "canvas_notimplemented.cc",
     "canvas_paint_mac.h",
     "canvas_paint_mac.mm",
     "canvas_paint_win.cc",
@@ -79,12 +76,17 @@ component("gfx") {
     "color_utils.h",
     "display.cc",
     "display.h",
+    "display_change_notifier.cc",
+    "display_change_notifier.h",
     "display_observer.cc",
     "display_observer.h",
     "favicon_size.cc",
     "favicon_size.h",
     "font.cc",
     "font.h",
+    "font_fallback.h",
+    "font_fallback_linux.cc",
+    "font_fallback_mac.cc",
     "font_fallback_win.cc",
     "font_fallback_win.h",
     "font_list.cc",
@@ -93,9 +95,9 @@ component("gfx") {
     "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",
+    "font_render_params_win.cc",
+    "font_render_params.cc",
+    "font_render_params.h",
     "frame_time.h",
     "gdi_util.cc",
     "gdi_util.h",
@@ -133,6 +135,8 @@ component("gfx") {
     "interpolated_transform.h",
     "linux_font_delegate.cc",
     "linux_font_delegate.h",
+    "mac/coordinate_conversion.h",
+    "mac/coordinate_conversion.mm",
     "mac/scoped_ns_disable_screen_updates.h",
     "native_widget_types.h",
     "nine_image_painter.cc",
@@ -228,6 +232,7 @@ component("gfx") {
     "//third_party/zlib",
     "//ui/gfx/geometry",
   ]
+  forward_dependent_configs_from = [ "//skia" ]
 
   # Text rendering conditions (complicated so separated out).
   if (is_android || is_ios) {
@@ -252,7 +257,7 @@ component("gfx") {
       sources += [ "render_text_ozone.cc" ]
     }
   }
-  
+
   # iOS.
   if (is_ios) {
     sources -= [
@@ -288,6 +293,8 @@ component("gfx") {
       "android",
       "jnigraphics",
     ]
+  } else {
+    sources -= [ "canvas_notimplemented.cc" ]
   }
 
   # Windows.
@@ -315,13 +322,6 @@ component("gfx") {
   if (use_ozone) {
     sources += [
       "platform_font_ozone.cc",
-      "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.h",
-      "ozone/overlay_candidates_ozone.cc",
-      "ozone/overlay_candidates_ozone.h",
     ]
   }
 
@@ -336,7 +336,7 @@ component("gfx") {
 
   if (use_x11) {
     deps += [
-      ":gfx_x11",
+      "//ui/gfx/x",
     ]
   } else {
     sources -= [
@@ -353,12 +353,19 @@ component("gfx") {
     ]
     configs += [ "//build/config/linux:pangocairo" ]
   }
+  if (use_pango && use_ozone) {
+    sources -= [
+      "platform_font_ozone.cc",
+    ]
+  }
 }
 
 # Looking for gfx_geometry? It's //ui/gfx/geometry:geometry
 
-source_set("gfx_test_support") {
+source_set("test_support") {
   sources = [
+    "test/fontconfig_util_linux.cc",
+    "test/fontconfig_util_linux.h",
     "test/gfx_util.cc",
     "test/gfx_util.h",
     "test/ui_cocoa_test_helper.h",
@@ -366,10 +373,12 @@ source_set("gfx_test_support") {
   ]
 
   deps = [
+    ":gfx",
     "//base",
     "//base/test:test_support",
     "//skia",
     "//testing/gtest",
+    "//ui/gfx/geometry",
   ]
 
   if (is_ios) {
@@ -379,6 +388,9 @@ source_set("gfx_test_support") {
       "test/ui_cocoa_test_helper.mm",
     ]
   }
+  if (is_linux) {
+    configs += [ "//build/config/linux:fontconfig" ]
+  }
 }
 
 test("gfx_unittests") {
@@ -395,17 +407,32 @@ test("gfx_unittests") {
     "geometry/size_unittest.cc",
     "geometry/vector2d_unittest.cc",
     "geometry/vector3d_unittest.cc",
+    "mac/coordinate_conversion_unittest.mm",
     "range/range_unittest.cc",
+    "test/run_all_unittests.cc",
   ]
 
   deps = [
     ":gfx",
+    ":test_support",
     "//base",
-    "//base/test:run_all_unittests",
-    "//base/test:run_all_unittests",
+    "//base/test:test_support",
     "//testing/gtest",
+    "//ui/base",
     "//ui/gfx/geometry",
+    "//ui/resources:ui_test_pak",
   ]
+
+  if (use_pango) {
+    sources += [
+      "font_render_params_linux_unittest.cc",
+      "platform_font_pango_unittest.cc",
+    ]
+    configs += [
+      "//build/config/linux:pangocairo",
+      "//build/config/linux:pangoft2",
+    ]
+  }
 }
 
 if (is_android) {
@@ -418,28 +445,3 @@ if (is_android) {
     jni_package = "gfx"
   }
 }
-
-if (use_x11) {
-  component("gfx_x11") {
-    sources = [
-      "x/x11_atom_cache.cc",
-      "x/x11_atom_cache.h",
-      "x/x11_connection.cc",
-      "x/x11_connection.h",
-      "x/x11_error_tracker.cc",
-      "x/x11_error_tracker.h",
-      "x/x11_switches.cc",
-      "x/x11_switches.h",
-      "x/x11_types.cc",
-      "x/x11_types.h",
-    ]
-
-    defines = [ "GFX_IMPLEMENTATION" ]
-    configs += [ "//build/config/linux:x11" ]
-
-    deps = [
-      ":gfx_export",
-      "//base"
-    ]
-  }
-}