Skip to content

Commit

Permalink
Make //ui/base/x and //ui/gfx/x export their configs
Browse files Browse the repository at this point in the history
Targets depending on //ui/base/x need to use "linux:xrandr" config and
the ones depending on //ui/gfx/x, "linux:x11". This CL makes those
configs public in targets where they are used, so that they can be
omitted everywhere else.

Change-Id: Ied1f5cc85e9af4172b1472a75d53a71526d491f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2162864
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763380}
  • Loading branch information
hferreiro authored and Commit Bot committed Apr 28, 2020
1 parent ff61c05 commit 8e92ddc
Show file tree
Hide file tree
Showing 40 changed files with 10 additions and 109 deletions.
7 changes: 0 additions & 7 deletions chrome/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,6 @@ if (!is_android && !is_mac) {
ldflags += [ "-Wl,--version-script=" +
rebase_path(version_script, root_build_dir) ]
}

if (use_x11) {
configs += [
"//build/config/linux:x11",
"//build/config/linux:xext",
]
}
}

if (is_chromeos || is_win) {
Expand Down
6 changes: 0 additions & 6 deletions chrome/app/chrome_main_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,6 @@
#include "chrome/browser/diagnostics/diagnostics_writer.h"
#endif

#if defined(USE_X11)
#include <stdlib.h>
#include <string.h>
#include "ui/base/x/x11_util.h" // nogncheck
#endif

#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
#include "components/crash/core/app/breakpad_linux.h"
#include "v8/include/v8-wasm-trap-handler-posix.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4176,7 +4176,6 @@ jumbo_static_library("browser") {
}
}
if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [ "//ui/gfx/x" ]
}
deps += [ "//services/service_manager/zygote" ]
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,6 @@ jumbo_static_library("extensions") {
}

if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [
"//ui/events:events_base",
"//ui/events/platform",
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2725,7 +2725,6 @@ jumbo_static_library("ui") {
"views/javascript_app_modal_event_blocker_x11.cc",
"views/javascript_app_modal_event_blocker_x11.h",
]
configs += [ "//build/config/linux:x11" ]
deps += [
"//components/dbus/menu",
"//ui/events/devices",
Expand Down
1 change: 0 additions & 1 deletion chrome/test/chromedriver/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ source_set("lib") {
}

if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [ "//ui/gfx/x" ]
}

Expand Down
1 change: 0 additions & 1 deletion components/viz/demo/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ executable("viz_demo") {
"//ui/events/platform/x11",
"//ui/platform_window/x11",
]
configs += [ "//build/config/linux:x11" ]
}

if (is_win) {
Expand Down
2 changes: 0 additions & 2 deletions components/viz/service/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ viz_component("service") {
"display_embedder/software_output_device_x11.cc",
"display_embedder/software_output_device_x11.h",
]
configs = [ "//build/config/linux:x11" ]
deps += [ "//ui/gfx/x" ]
}

Expand Down Expand Up @@ -407,7 +406,6 @@ viz_source_set("gpu_service_dependencies") {
"display_embedder/skia_output_device_x11.cc",
"display_embedder/skia_output_device_x11.h",
]
configs = [ "//build/config/linux:x11" ]
deps += [ "//ui/gfx/x" ]
}

Expand Down
1 change: 0 additions & 1 deletion content/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,6 @@ jumbo_source_set("browser") {
}

if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [
"//ui/events/platform/x11",
"//ui/gfx/x",
Expand Down
2 changes: 0 additions & 2 deletions gpu/tools/compositor_model_bench/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ if (is_linux && use_x11 && current_cpu != "arm") {

libs = [ "GL" ]

configs += [ "//build/config/linux:x11" ]

deps = [
"//base",
"//ui/gfx/x",
Expand Down
1 change: 0 additions & 1 deletion gpu/vulkan/demo/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@ if (use_x11) {
]

deps += [ "//ui/gfx/x" ]
configs += [ "//build/config/linux:x11" ]
}
}
1 change: 0 additions & 1 deletion gpu/vulkan/x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ component("x") {
defines = [ "IS_VULKAN_X11_IMPL" ]

public_configs = [ ":vulkan_x11" ]
configs += [ "//build/config/linux:x11" ]

deps = [
"//ui/events/platform/x11",
Expand Down
4 changes: 0 additions & 4 deletions media/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,6 @@ jumbo_source_set("base") {
}

if (use_x11) {
configs += [
"//build/config/linux:x11",
"//build/config/linux:xext",
]
sources += [ "user_input_monitor_linux.cc" ]
deps += [
"//ui/events:events_base",
Expand Down
4 changes: 0 additions & 4 deletions media/cast/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,6 @@ if (is_win || is_mac || (is_linux && !is_chromeos)) {
"test/linux_output_window.cc",
"test/linux_output_window.h",
]
configs += [
"//build/config/linux:x11",
"//build/config/linux:xext",
]
public_deps += [ "//ui/gfx/x" ]
deps += [ "//third_party/libyuv" ]
}
Expand Down
2 changes: 0 additions & 2 deletions media/gpu/vaapi/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ source_set("vaapi") {
}

if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [ "//ui/gfx/x" ]
sources += [
"vaapi_picture_tfp.cc",
Expand Down Expand Up @@ -167,7 +166,6 @@ source_set("common") {
}

if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [ "//ui/gfx/x" ]
}

Expand Down
7 changes: 3 additions & 4 deletions remoting/host/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,10 @@ static_library("common") {
}

if (use_x11) {
configs += [
"//build/config/linux:x11",
"//build/config/linux:xrandr",
deps += [
"//remoting/host/linux:x11",
"//ui/gfx/x",
]
deps += [ "//remoting/host/linux:x11" ]
if (is_desktop_linux) {
deps += [ "//build/config/linux/gtk" ]
}
Expand Down
1 change: 1 addition & 0 deletions remoting/host/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ if (use_x11) {
"x_server_clipboard.cc",
"x_server_clipboard.h",
]
public_deps = [ "//ui/gfx/x" ]
deps = [ "//third_party/webrtc_overrides:webrtc_component" ]
}
}
Expand Down
5 changes: 1 addition & 4 deletions services/device/wake_lock/power_save_blocker/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ source_set("power_save_blocker") {
"//ui/gfx",
]
if (use_x11) {
configs += [
"//build/config/linux:x11",
"//build/config/linux:xscrnsaver",
]
configs += [ "//build/config/linux:xscrnsaver" ]
deps += [ "//ui/gfx/x" ]
}
} else if (is_mac) {
Expand Down
4 changes: 0 additions & 4 deletions ui/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,11 @@ jumbo_component("base") {

if (is_desktop_linux && (use_x11 || ozone_platform_x11)) {
public_deps += [ "//ui/base/x" ]
configs += [ "//build/config/linux:x11" ]

# X11 drag and drop wants to use common drag and drop types.
allow_circular_includes_from = [ "//ui/base/x" ]

if (!is_chromeos) {
configs += [ "//build/config/linux:xscrnsaver" ]
deps += [ "//ui/gfx/x" ]
}
}
Expand Down Expand Up @@ -1117,8 +1115,6 @@ test("ui_base_unittests") {
}

if (use_x11) {
configs += [ "//build/config/linux:x11" ]

deps += [
"//ui/events/platform/x11",
"//ui/gfx/x",
Expand Down
1 change: 0 additions & 1 deletion ui/base/clipboard/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ jumbo_component("clipboard") {
"clipboard_x11.cc",
"clipboard_x11.h",
]
configs += [ "//build/config/linux:x11" ]
deps += [
"//ui/base",
"//ui/base/x",
Expand Down
5 changes: 1 addition & 4 deletions ui/base/idle/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ component("idle") {
}

if (use_x11 && !is_chromeos) {
configs += [
"//build/config/linux:x11",
"//build/config/linux:xscrnsaver",
]
configs += [ "//build/config/linux:xscrnsaver" ]
deps += [ "//ui/gfx/x" ]
sources += [
"idle_query_x11.cc",
Expand Down
5 changes: 1 addition & 4 deletions ui/base/x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ jumbo_component("x") {
]
}

configs += [
"//build/config/linux:x11",
"//build/config/linux:xrandr",
]
public_configs = [ "//build/config/linux:xrandr" ]

defines = [ "IS_UI_BASE_X_IMPL" ]

Expand Down
1 change: 0 additions & 1 deletion ui/compositor/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ jumbo_static_library("test_support") {
]

if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [
"//ui/events/x",
"//ui/gfx/x",
Expand Down
2 changes: 0 additions & 2 deletions ui/events/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ jumbo_component("events") {
if (use_x11 || ozone_platform_x11) {
public += [ "x/x11_event_translation.h" ]
sources += [ "x/x11_event_translation.cc" ]
configs += [ "//build/config/linux:x11" ]
deps += [
"//ui/events/devices",
"//ui/events/devices/x11",
Expand Down Expand Up @@ -612,7 +611,6 @@ if (!is_ios) {

if (use_x11) {
sources += [ "devices/x11/device_data_manager_x11_unittest.cc" ]
configs += [ "//build/config/linux:x11" ]
deps += [
"//ui/events/devices/x11",
"//ui/events/x:unittests",
Expand Down
2 changes: 0 additions & 2 deletions ui/events/devices/x11/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jumbo_component("x11") {
"touch_factory_x11.h",
]

configs += [ "//build/config/linux:x11" ]

defines = [ "EVENTS_DEVICES_X11_IMPLEMENTATION" ]

deps = [
Expand Down
2 changes: 0 additions & 2 deletions ui/events/keycodes/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,5 @@ if (use_x11 || ozone_platform_x11) {
"//ui/events:dom_keycode_converter",
"//ui/gfx/x",
]

configs += [ "//build/config/linux:x11" ]
}
}
2 changes: 0 additions & 2 deletions ui/events/platform/x11/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jumbo_component("x11") {

defines = [ "EVENTS_IMPLEMENTATION" ]

configs += [ "//build/config/linux:x11" ]

public_deps = [
"//ui/events",
"//ui/events:events_base",
Expand Down
2 changes: 0 additions & 2 deletions ui/events/x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ component("x") {
"//ui/events/keycodes:x11",
"//ui/gfx/x",
]
configs += [ "//build/config/linux:x11" ]
}

# XEvent translation tests are kept in a separate source_set so that both
Expand All @@ -44,7 +43,6 @@ source_set("unittests") {
"events_x_unittest.cc",
"x11_event_translation_unittest.cc",
]
configs += [ "//build/config/linux:x11" ]
deps = [
"//base/test:test_support",
"//testing/gtest",
Expand Down
2 changes: 0 additions & 2 deletions ui/gfx/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ jumbo_component("gfx") {

if (use_x11) {
deps += [ "//ui/gfx/x" ]
configs += [ "//build/config/linux:x11" ]
}
}

Expand Down Expand Up @@ -452,7 +451,6 @@ jumbo_component("color_space") {
}
if (use_x11) {
deps += [ "//ui/gfx/x" ]
configs += [ "//build/config/linux:x11" ]
}
defines = [ "COLOR_SPACE_IMPLEMENTATION" ]
}
Expand Down
1 change: 0 additions & 1 deletion ui/gfx/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ source_set("gbm") {

if (use_x11) {
component("gpu_memory_buffer_support_x11") {
configs += [ "//build/config/linux:x11" ]
sources = [
"gpu_memory_buffer_support_x11.cc",
"gpu_memory_buffer_support_x11.h",
Expand Down
2 changes: 1 addition & 1 deletion ui/gfx/x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jumbo_component("x") {

defines = [ "GFX_IMPLEMENTATION" ]

configs += [ "//build/config/linux:x11" ]
public_configs = [ "//build/config/linux:x11" ]

deps = [
"//base",
Expand Down
9 changes: 0 additions & 9 deletions ui/gl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,6 @@ jumbo_component("gl") {
"gl_visual_picker_glx.h",
]

configs += [
"//build/config/linux:x11",
"//build/config/linux:xcomposite",
"//build/config/linux:xext",
"//build/config/linux:xrandr",
]

deps += [
"//ui/base/x",
"//ui/gfx/x",
Expand Down Expand Up @@ -511,7 +504,6 @@ jumbo_static_library("test_support") {
}

if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [
"//ui/gfx/x",
"//ui/platform_window/x11",
Expand Down Expand Up @@ -613,7 +605,6 @@ test("gl_unittests") {
if (use_x11) {
sources += [ "gl_context_glx_unittest.cc" ]
deps += [ "//ui/gfx/x" ]
configs += [ "//build/config/linux:x11" ]
}
}

Expand Down
2 changes: 0 additions & 2 deletions ui/gl/init/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ jumbo_component("init") {
"gl_initializer_x11.cc",
]

configs += [ "//build/config/linux:x11" ]

deps += [
"//ui/base/x",
"//ui/base/x:gl",
Expand Down
2 changes: 1 addition & 1 deletion ui/gtk/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jumbo_component("gtk") {

if (use_x11 || ozone_platform_x11) {
# select_file_dialog_impl_kde.cc still refers to XID
configs += [ "//build/config/linux:x11" ]
deps += [ "//ui/gfx/x" ]
}

# TODO: This should be removed.
Expand Down
1 change: 0 additions & 1 deletion ui/gtk/x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ component("x") {
]
public_deps = [ "//ui/gtk:gtk_ui_delegate" ]
defines = [ "IS_UI_GTK_X_IMPL" ]
configs += [ "//build/config/linux:x11" ]
}
Loading

0 comments on commit 8e92ddc

Please sign in to comment.