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

Unified Diff: ui/gfx/BUILD.gn

Issue 2915673003: ui/gfx: Use separate components for color_space and switches (Closed)
Patch Set: Fix windows build Created 3 years, 7 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 | « no previous file | ui/gfx/color_space.h » ('j') | ui/gfx/gfx_color_export.h » ('J')
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
index e78c050cbb3486eecf884ee699a8b3ed600182c2..d370de40f8a20b3237c500b584c39baae28758ef 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -54,8 +54,6 @@ component("gfx") {
"color_analysis.cc",
"color_analysis.h",
"color_palette.h",
- "color_space_win.cc",
- "color_space_win.h",
"color_transform.cc",
"color_transform.h",
"color_utils.cc",
@@ -88,9 +86,6 @@ component("gfx") {
"gfx_paths.h",
"half_float.cc",
"half_float.h",
- "icc_profile_mac.mm",
- "icc_profile_win.cc",
- "icc_profile_x11.cc",
"icon_util.cc",
"icon_util.h",
"image/image.cc",
@@ -240,7 +235,7 @@ component("gfx") {
":memory_buffer_sources",
":native_widget_types",
":selection_bound_sources",
- ":switches_sources",
+ ":switches",
"//base",
"//skia",
"//third_party/icu",
@@ -387,10 +382,7 @@ component("gfx") {
deps += [ "//ui/gfx/x" ]
configs += [ "//build/config/linux:x11" ]
} else {
- sources -= [
- "icc_profile_x11.cc",
- "path_x11.cc",
- ]
+ sources -= [ "path_x11.cc" ]
}
if (use_cairo) {
@@ -402,8 +394,13 @@ component("color_space") {
sources = [
"color_space.cc",
"color_space.h",
+ "color_space_win.cc",
+ "color_space_win.h",
"icc_profile.cc",
"icc_profile.h",
+ "icc_profile_mac.mm",
+ "icc_profile_win.cc",
+ "icc_profile_x11.cc",
"skia_color_space_util.cc",
"skia_color_space_util.h",
Nico 2017/06/01 14:52:14 add new export.h file here
]
@@ -413,11 +410,23 @@ component("color_space") {
"//skia",
]
deps = [
- ":switches_sources",
+ ":switches",
"//base",
"//skia",
]
- defines = [ "GFX_IMPLEMENTATION" ]
+ defines = [ "GFX_COLOR_IMPLEMENTATION" ]
Nico 2017/06/01 14:52:14 optional nit: GFX_COLOR_SPACE_IMPLEMENTATION would
+ if (is_mac) {
+ libs = [
+ "CoreFoundation.framework",
+ "CoreGraphics.framework",
+ ]
+ }
+ if (use_x11) {
+ deps += [ "//ui/gfx/x" ]
+ configs += [ "//build/config/linux:x11" ]
+ } else {
+ sources -= [ "icc_profile_x11.cc" ]
+ }
}
# Depend on this to use half_float.h without pulling in all of gfx.
@@ -530,7 +539,7 @@ source_set("memory_buffer_sources") {
deps = [
":native_widget_types",
- ":switches_sources",
+ ":switches",
"//base",
"//ui/gfx/geometry",
]
@@ -547,20 +556,13 @@ source_set("memory_buffer_sources") {
}
}
-source_set("switches_sources") {
- visibility = [ ":*" ] # Depend on through ":switches_sources".
-
+component("switches") {
Nico 2017/06/01 14:52:14 Please call this gfx_switches, else this will resu
Nico 2017/06/16 19:24:09 I think this wasn't done.
ccameron 2017/06/16 19:49:27 Oops. Fixed.
sources = [
+ "gfx_switches_export.h",
"switches.cc",
"switches.h",
]
-
- defines = [ "GFX_IMPLEMENTATION" ]
-
- deps = [
- ":gfx_export",
- "//base",
- ]
+ defines = [ "GFX_SWITCHES_IMPLEMENTATION" ]
}
static_library("test_support") {
« no previous file with comments | « no previous file | ui/gfx/color_space.h » ('j') | ui/gfx/gfx_color_export.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698