summaryrefslogtreecommitdiff
path: root/chromium/ui/gfx/x/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/gfx/x/BUILD.gn')
-rw-r--r--chromium/ui/gfx/x/BUILD.gn117
1 files changed, 62 insertions, 55 deletions
diff --git a/chromium/ui/gfx/x/BUILD.gn b/chromium/ui/gfx/x/BUILD.gn
index 5369e38efed..24d36ecba8a 100644
--- a/chromium/ui/gfx/x/BUILD.gn
+++ b/chromium/ui/gfx/x/BUILD.gn
@@ -3,23 +3,12 @@
# found in the LICENSE file.
import("//build/config/jumbo.gni")
-import("//build/config/sysroot.gni")
import("//build/config/ui.gni")
import("//ui/ozone/ozone.gni")
assert(use_x11 || ozone_platform_x11)
-declare_args() {
- xcbproto_path = ""
-}
-
-if (xcbproto_path == "") {
- if (use_sysroot) {
- xcbproto_path = "$sysroot/usr/share/xcb"
- } else {
- xcbproto_path = "/usr/share/xcb"
- }
-}
+xcbproto_path = "//third_party/xcbproto/src"
config("x11_private_config") {
cflags = [
@@ -32,54 +21,62 @@ config("x11_private_config") {
defines = [ "IS_X11_IMPL" ]
}
-action_foreach("gen_xprotos") {
+action("gen_xprotos") {
visibility = [ ":xprotos" ]
script = "gen_xproto.py"
- sources = [
- "$xcbproto_path/bigreq.xml",
- "$xcbproto_path/composite.xml",
- "$xcbproto_path/damage.xml",
- "$xcbproto_path/dpms.xml",
- "$xcbproto_path/dri2.xml",
- "$xcbproto_path/dri3.xml",
- "$xcbproto_path/ge.xml",
- "$xcbproto_path/glx.xml",
- "$xcbproto_path/present.xml",
- "$xcbproto_path/randr.xml",
- "$xcbproto_path/record.xml",
- "$xcbproto_path/render.xml",
- "$xcbproto_path/res.xml",
- "$xcbproto_path/screensaver.xml",
- "$xcbproto_path/shape.xml",
- "$xcbproto_path/shm.xml",
- "$xcbproto_path/sync.xml",
- "$xcbproto_path/xc_misc.xml",
- "$xcbproto_path/xevie.xml",
- "$xcbproto_path/xf86dri.xml",
- "$xcbproto_path/xf86vidmode.xml",
- "$xcbproto_path/xfixes.xml",
- "$xcbproto_path/xinerama.xml",
- "$xcbproto_path/xinput.xml",
- "$xcbproto_path/xkb.xml",
- "$xcbproto_path/xprint.xml",
- "$xcbproto_path/xproto.xml",
- "$xcbproto_path/xselinux.xml",
- "$xcbproto_path/xtest.xml",
- "$xcbproto_path/xv.xml",
- "$xcbproto_path/xvmc.xml",
+ protos = [
+ "bigreq",
+ "composite",
+ "damage",
+ "dpms",
+ "dri2",
+ "dri3",
+ "ge",
+ "glx",
+ "present",
+ "randr",
+ "record",
+ "render",
+ "res",
+ "screensaver",
+ "shape",
+ "shm",
+ "sync",
+ "xc_misc",
+ "xevie",
+ "xf86dri",
+ "xf86vidmode",
+ "xfixes",
+ "xinerama",
+ "xinput",
+ "xkb",
+ "xprint",
+ "xproto",
+ "xselinux",
+ "xtest",
+ "xv",
+ "xvmc",
]
+ sources = []
outputs = [
- "$target_gen_dir/{{source_name_part}}_undef.h",
- "$target_gen_dir/{{source_name_part}}.h",
- "$target_gen_dir/{{source_name_part}}.cc",
+ "$target_gen_dir/read_event.cc",
+ "$target_gen_dir/extension_manager.h",
+ "$target_gen_dir/extension_manager.cc",
]
- args = [ "{{source}}" ] + rebase_path(outputs, root_build_dir)
- if (use_sysroot) {
- args += [
- "--sysroot",
- rebase_path(sysroot, root_build_dir),
+ foreach(proto, protos) {
+ sources += [ "$xcbproto_path/src/${proto}.xml" ]
+ outputs += [
+ "$target_gen_dir/${proto}_undef.h",
+ "$target_gen_dir/${proto}.h",
+ "$target_gen_dir/${proto}.cc",
]
}
+
+ args = rebase_path([
+ xcbproto_path,
+ target_gen_dir,
+ ],
+ root_build_dir) + protos
}
component("xprotos") {
@@ -90,12 +87,13 @@ component("xprotos") {
sources = get_target_outputs(":gen_xprotos") + [
"xproto_internal.h",
"xproto_types.h",
- "request_queue.h",
- "request_queue.cc",
+ "xproto_types.cc",
"xproto_util.h",
"xproto_util.cc",
"connection.h",
"connection.cc",
+ "event.h",
+ "event.cc",
"x11_switches.cc",
"x11_switches.h",
]
@@ -131,3 +129,12 @@ jumbo_component("x") {
]
public_deps = [ ":xprotos" ]
}
+
+source_set("unit_test") {
+ testonly = true
+ sources = [ "connection_unittest.cc" ]
+ deps = [
+ "//testing/gtest",
+ "//ui/gfx/x",
+ ]
+}