chromium/components/exo/wayland/BUILD.gn

# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chromeos/ui_mode.gni")
import("//build/config/ozone.gni")
import("//build/config/ui.gni")
import("//gpu/vulkan/features.gni")
import("//testing/test.gni")
import("//ui/base/ui_features.gni")

# Exo is only used on ash.
assert(is_chromeos_ash)

# ash implies ozone.
assert(use_ozone)

source_set("wayland") {
  sources = [
    "client_tracker.cc",
    "client_tracker.h",
    "content_type.cc",
    "content_type.h",
    "output_configuration_change.cc",
    "output_configuration_change.h",
    "output_controller.cc",
    "output_controller.h",
    "output_metrics.cc",
    "output_metrics.h",
    "overlay_prioritizer.cc",
    "overlay_prioritizer.h",
    "scoped_wl.cc",
    "scoped_wl.h",
    "serial_tracker.cc",
    "serial_tracker.h",
    "server.cc",
    "server.h",
    "server_util.cc",
    "server_util.h",
    "surface_augmenter.cc",
    "surface_augmenter.h",
    "wayland_display_observer.cc",
    "wayland_display_observer.h",
    "wayland_display_output.cc",
    "wayland_display_output.h",
    "wayland_display_util.cc",
    "wayland_display_util.h",
    "wayland_dmabuf_feedback_manager.cc",
    "wayland_dmabuf_feedback_manager.h",
    "wayland_input_delegate.cc",
    "wayland_input_delegate.h",
    "wayland_keyboard_delegate.cc",
    "wayland_keyboard_delegate.h",
    "wayland_pointer_delegate.cc",
    "wayland_pointer_delegate.h",
    "wayland_positioner.cc",
    "wayland_positioner.h",
    "wayland_protocol_logger.cc",
    "wayland_protocol_logger.h",
    "wayland_touch_delegate.cc",
    "wayland_touch_delegate.h",
    "wayland_watcher.cc",
    "wl_compositor.cc",
    "wl_compositor.h",
    "wl_data_device_manager.cc",
    "wl_data_device_manager.h",
    "wl_output.cc",
    "wl_output.h",
    "wl_seat.cc",
    "wl_seat.h",
    "wl_shell.cc",
    "wl_shell.h",
    "wl_shm.cc",
    "wl_shm.h",
    "wl_subcompositor.cc",
    "wl_subcompositor.h",
    "wp_fractional_scale.cc",
    "wp_fractional_scale.h",
    "wp_presentation.cc",
    "wp_presentation.h",
    "wp_single_pixel_buffer.cc",
    "wp_single_pixel_buffer.h",
    "wp_viewporter.cc",
    "wp_viewporter.h",
    "xdg_shell.cc",
    "xdg_shell.h",
    "zaura_output_manager.cc",
    "zaura_output_manager.h",
    "zaura_output_manager_v2.cc",
    "zaura_output_manager_v2.h",
    "zaura_shell.cc",
    "zaura_shell.h",
    "zcr_alpha_compositing.cc",
    "zcr_alpha_compositing.h",
    "zcr_color_manager.cc",
    "zcr_color_manager.h",
    "zcr_cursor_shapes.cc",
    "zcr_cursor_shapes.h",
    "zcr_extended_drag.cc",
    "zcr_extended_drag.h",
    "zcr_gaming_input.cc",
    "zcr_gaming_input.h",
    "zcr_keyboard_configuration.cc",
    "zcr_keyboard_configuration.h",
    "zcr_keyboard_extension.cc",
    "zcr_keyboard_extension.h",
    "zcr_notification_shell.cc",
    "zcr_notification_shell.h",
    "zcr_remote_shell.cc",
    "zcr_remote_shell.h",
    "zcr_remote_shell_event_mapping.h",
    "zcr_remote_shell_impl.cc",
    "zcr_remote_shell_impl.h",
    "zcr_remote_shell_v2.cc",
    "zcr_remote_shell_v2.h",
    "zcr_secure_output.cc",
    "zcr_secure_output.h",
    "zcr_stylus.cc",
    "zcr_stylus.h",
    "zcr_stylus_tools.cc",
    "zcr_stylus_tools.h",
    "zcr_test_controller.h",
    "zcr_touchpad_haptics.cc",
    "zcr_touchpad_haptics.h",
    "zcr_ui_controls.h",
    "zcr_vsync_feedback.cc",
    "zcr_vsync_feedback.h",
    "zwp_idle_inhibit_manager.cc",
    "zwp_idle_inhibit_manager.h",
    "zwp_input_timestamps_manager.cc",
    "zwp_input_timestamps_manager.h",
    "zwp_keyboard_shortcuts_inhibit_manager.cc",
    "zwp_keyboard_shortcuts_inhibit_manager.h",
    "zwp_linux_dmabuf.cc",
    "zwp_linux_dmabuf.h",
    "zwp_linux_explicit_synchronization.cc",
    "zwp_linux_explicit_synchronization.h",
    "zwp_pointer_constraints.cc",
    "zwp_pointer_constraints.h",
    "zwp_pointer_gestures.cc",
    "zwp_pointer_gestures.h",
    "zwp_relative_pointer_manager.cc",
    "zwp_relative_pointer_manager.h",
    "zwp_text_input_manager.cc",
    "zwp_text_input_manager.h",
    "zxdg_decoration_manager.h",
    "zxdg_output_manager.cc",
    "zxdg_output_manager.h",
  ]

  defines = [ "EXO_IMPLEMENTATION" ]

  deps = [
    "//ash",
    "//ash:ash",
    "//ash/public/cpp",
    "//base",
    "//build/config/linux/libdrm",
    "//chromeos/ui/base",
    "//chromeos/ui/frame",
    "//components/exo",
    "//components/exo/wayland/protocol:aura_output_management_protocol",
    "//components/exo/wayland/protocol:aura_shell_protocol",
    "//components/exo/wayland/protocol:chrome_color_management_protocol",
    "//components/exo/wayland/protocol:overlay_prioritizer_protocol",
    "//components/exo/wayland/protocol:surface_augmenter_protocol",
    "//components/version_info",
    "//device/gamepad",
    "//services/device/public/mojom",
    "//services/device/wake_lock/power_save_blocker",
    "//services/viz/privileged/mojom/compositing",
    "//services/viz/public/mojom",
    "//skia",
    "//third_party/libsync",
    "//third_party/wayland:wayland_server",
    "//third_party/wayland-protocols:alpha_compositing_protocol",
    "//third_party/wayland-protocols:content_type_protocol",
    "//third_party/wayland-protocols:cursor_shapes_protocol",
    "//third_party/wayland-protocols:extended_drag",
    "//third_party/wayland-protocols:fractional_scale_protocol",
    "//third_party/wayland-protocols:gaming_input_protocol",
    "//third_party/wayland-protocols:idle_inhibit_protocol",
    "//third_party/wayland-protocols:input_timestamps_protocol",
    "//third_party/wayland-protocols:keyboard_configuration_protocol",
    "//third_party/wayland-protocols:keyboard_extension_protocol",
    "//third_party/wayland-protocols:keyboard_shortcuts_inhibit_protocol",
    "//third_party/wayland-protocols:linux_dmabuf_protocol",
    "//third_party/wayland-protocols:linux_explicit_synchronization_protocol",
    "//third_party/wayland-protocols:notification_shell_protocol",
    "//third_party/wayland-protocols:pointer_constraints_protocol",
    "//third_party/wayland-protocols:pointer_gestures_protocol",
    "//third_party/wayland-protocols:presentation_time_protocol",
    "//third_party/wayland-protocols:relative_pointer_protocol",
    "//third_party/wayland-protocols:remote_shell_protocol",
    "//third_party/wayland-protocols:secure_output_protocol",
    "//third_party/wayland-protocols:single_pixel_buffer",
    "//third_party/wayland-protocols:stylus_protocol",
    "//third_party/wayland-protocols:stylus_tools_protocol",
    "//third_party/wayland-protocols:text_input_extension_protocol",
    "//third_party/wayland-protocols:text_input_protocol",
    "//third_party/wayland-protocols:touchpad_haptics_protocol",
    "//third_party/wayland-protocols:ui_controls_protocol",
    "//third_party/wayland-protocols:viewporter_protocol",
    "//third_party/wayland-protocols:vsync_feedback_protocol",
    "//third_party/wayland-protocols:xdg_decoration_protocol",
    "//third_party/wayland-protocols:xdg_output_protocol",
    "//third_party/wayland-protocols:xdg_shell_protocol",
    "//ui/accessibility",
    "//ui/aura",
    "//ui/base",
    "//ui/base/cursor/mojom:cursor_type",
    "//ui/base/dragdrop/mojom:mojom_shared",
    "//ui/base/wayland:color_manager_util",
    "//ui/base/wayland:wayland_display_util",
    "//ui/base/wayland:wayland_server_input_types",
    "//ui/display/manager",
    "//ui/events:dom_keycode_converter",
    "//ui/events:events_base",
    "//ui/events/devices:devices",
    "//ui/events/ozone/layout",
    "//ui/gfx/linux:drm",
    "//ui/ozone",
    "//ui/views",
    "//ui/wm:wm",
    "//ui/wm/public",
  ]

  if (use_xkbcommon) {
    deps += [ "//ui/events/keycodes:xkb" ]
  }
}

static_library("test_controller") {
  testonly = true
  sources = [ "zcr_test_controller.cc" ]
  deps = [
    ":wayland",
    "//base/test:test_support",
    "//third_party/wayland:wayland_server",
    "//third_party/wayland-protocols:test_controller_protocol",
    "//ui/events",
  ]
}

static_library("test_controller_stub") {
  testonly = false
  sources = [
    "zcr_test_controller.h",
    "zcr_test_controller_stub.cc",
  ]
}

static_library("ui_controls_protocol") {
  testonly = true
  defines = [ "UI_CONTROLS_PROTOCOL_IMPLEMENTATION" ]
  sources = [ "zcr_ui_controls.cc" ]
  deps = [
    ":wayland",
    "//ash",
    "//ash:test_support",
    "//base",
    "//base/test:test_support",
    "//components/exo",
    "//third_party/wayland:wayland_server",
    "//third_party/wayland-protocols:ui_controls_protocol",
    "//ui/aura",
    "//ui/base:test_support",
    "//ui/base/wayland:wayland_display_util",
    "//ui/events",
    "//ui/events:gesture_detection",
  ]
}

static_library("ui_controls_protocol_stub") {
  testonly = false
  defines = [ "UI_CONTROLS_PROTOCOL_IMPLEMENTATION" ]
  sources = [ "zcr_ui_controls_stub.cc" ]
  deps = [ ":wayland" ]
}

source_set("test_support") {
  testonly = true

  sources = [
    "test/client_util.cc",
    "test/client_util.h",
    "test/resource_key.h",
    "test/server_util.cc",
    "test/server_util.h",
    "test/shell_client_data.cc",
    "test/shell_client_data.h",
    "test/shm_buffer_factory.cc",
    "test/shm_buffer_factory.h",
    "test/test_buffer.cc",
    "test/test_buffer.h",
    "test/test_client.cc",
    "test/test_client.h",
    "test/test_wayland_client_thread.cc",
    "test/test_wayland_client_thread.h",
    "test/wayland_server_test.cc",
    "test/wayland_server_test.h",
    "test/wayland_server_test_base.cc",
    "test/wayland_server_test_base.h",
  ]

  deps = [
    ":client_support",
    ":wayland",
    "//base",
    "//base/test:test_support",
    "//components/exo",
    "//components/exo:test_support",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "client_tracker_unittest.cc",
    "clients/security_delegate_binding_test.cc",
    "output_controller_test_api.cc",
    "output_controller_test_api.h",
    "output_controller_unittest.cc",
    "output_metrics_unittest.cc",
    "serial_tracker_unittest.cc",
    "server_unittest.cc",
    "shell_unittest.cc",
    "surface_augmenter_unittest.cc",
    "surface_unittest.cc",
    "wayland_aura_shell_server_test.cc",
    "wayland_display_observer_unittest.cc",
    "wayland_display_output_unittest.cc",
    "wayland_display_util_unittest.cc",
    "wayland_keyboard_delegate_unittest.cc",
    "wayland_positioner_unittest.cc",
    "wayland_protocol_logger_unittest.cc",
    "wl_data_device_manager_unittest.cc",
    "zaura_output_manager_unittest.cc",
    "zaura_output_manager_v2_unittest.cc",
    "zaura_shell_unittest.cc",
    "zcr_remote_shell_impl_unittest.cc",
    "zcr_remote_shell_unittest.cc",
  ]

  deps = [
    ":client_support",
    ":test_support",
    ":wayland",
    "//ash",
    "//ash:test_support",
    "//ash/public/cpp",
    "//base/test:test_support",
    "//chromeos/ui/wm",
    "//components/exo",
    "//components/exo:test_support",
    "//components/exo/wayland/fuzzer:unit_tests",
    "//components/exo/wayland/protocol:aura_output_management_protocol",
    "//components/exo/wayland/protocol:aura_shell_protocol",
    "//components/exo/wayland/protocol:overlay_prioritizer_protocol",
    "//components/exo/wayland/protocol:surface_augmenter_protocol",
    "//skia",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/wayland:wayland_client",
    "//third_party/wayland-protocols:remote_shell_protocol",
    "//third_party/wayland-protocols:xdg_output_protocol",
    "//third_party/wayland-protocols:xdg_shell_protocol",
    "//ui/accessibility",
    "//ui/base/wayland:wayland_display_util",
    "//ui/compositor",
    "//ui/compositor:test_support",
    "//ui/display",
    "//ui/events:test_support",
    "//ui/gfx",
    "//ui/wm/public",
  ]
}

config("client_support_config") {
  if (ozone_platform_drm) {
    defines = [ "USE_GBM" ]
    if (enable_vulkan) {
      defines += [ "USE_VULKAN" ]
    }
  }
}

source_set("client_support") {
  sources = [
    "clients/client_base.cc",
    "clients/client_base.h",
    "clients/client_helper.cc",
    "clients/client_helper.h",
    "clients/globals.cc",
    "clients/globals.h",
  ]

  deps = [
    "//base",
    "//gpu/vulkan:vulkan",
    "//gpu/vulkan/init:init",
    "//ui/gl",
    "//ui/gl/init",
  ]

  public_deps = [
    "//components/exo/wayland/protocol:aura_output_management_protocol",
    "//components/exo/wayland/protocol:aura_shell_protocol",
    "//components/exo/wayland/protocol:chrome_color_management_protocol",
    "//components/exo/wayland/protocol:overlay_prioritizer_protocol",
    "//components/exo/wayland/protocol:surface_augmenter_protocol",
    "//skia",
    "//third_party/wayland:wayland_client",
    "//third_party/wayland-protocols:alpha_compositing_protocol",
    "//third_party/wayland-protocols:content_type_protocol",
    "//third_party/wayland-protocols:cursor_shapes_protocol",
    "//third_party/wayland-protocols:extended_drag",
    "//third_party/wayland-protocols:fractional_scale_protocol",
    "//third_party/wayland-protocols:fullscreen_shell_protocol",
    "//third_party/wayland-protocols:gaming_input_protocol",
    "//third_party/wayland-protocols:idle_inhibit_protocol",
    "//third_party/wayland-protocols:input_timestamps_protocol",
    "//third_party/wayland-protocols:keyboard_configuration_protocol",
    "//third_party/wayland-protocols:keyboard_extension_protocol",
    "//third_party/wayland-protocols:keyboard_shortcuts_inhibit_protocol",
    "//third_party/wayland-protocols:linux_dmabuf_protocol",
    "//third_party/wayland-protocols:linux_dmabuf_protocol",
    "//third_party/wayland-protocols:linux_explicit_synchronization_protocol",
    "//third_party/wayland-protocols:notification_shell_protocol",
    "//third_party/wayland-protocols:pointer_constraints_protocol",
    "//third_party/wayland-protocols:pointer_gestures_protocol",
    "//third_party/wayland-protocols:presentation_time_protocol",
    "//third_party/wayland-protocols:presentation_time_protocol",
    "//third_party/wayland-protocols:relative_pointer_protocol",
    "//third_party/wayland-protocols:remote_shell_protocol",
    "//third_party/wayland-protocols:secure_output_protocol",
    "//third_party/wayland-protocols:single_pixel_buffer",
    "//third_party/wayland-protocols:stylus_protocol",
    "//third_party/wayland-protocols:stylus_tools_protocol",
    "//third_party/wayland-protocols:text_input_extension_protocol",
    "//third_party/wayland-protocols:text_input_protocol",
    "//third_party/wayland-protocols:touchpad_haptics_protocol",
    "//third_party/wayland-protocols:ui_controls_protocol",
    "//third_party/wayland-protocols:viewporter_protocol",
    "//third_party/wayland-protocols:vsync_feedback_protocol",
    "//third_party/wayland-protocols:vsync_feedback_protocol",
    "//third_party/wayland-protocols:xdg_decoration_protocol",
    "//third_party/wayland-protocols:xdg_output_protocol",
    "//third_party/wayland-protocols:xdg_shell_protocol",
  ]

  if (ozone_platform_drm) {
    deps += [
      "//build/config/linux/libdrm",
      "//ui/ozone",
    ]
    public_deps += [ "//third_party/minigbm" ]
  }

  public_configs = [ ":client_support_config" ]
}

executable("wayland_rects_client") {
  sources = [ "clients/rects.cc" ]

  deps = [
    ":client_support",
    "//base",
    "//skia",
    "//third_party/wayland:wayland_client",
    "//third_party/wayland-protocols:input_timestamps_protocol",
    "//third_party/wayland-protocols:linux_dmabuf_protocol",
    "//third_party/wayland-protocols:presentation_time_protocol",
    "//ui/gfx/geometry",
    "//ui/gl",
  ]

  if (ozone_platform_drm) {
    defines = [ "USE_GBM" ]
    deps += [
      "//build/config/linux/libdrm",
      "//third_party/minigbm",
    ]
  }
}

source_set("simple") {
  sources = [
    "clients/simple.cc",
    "clients/simple.h",
  ]

  deps = [
    ":client_support",
    "//base",
    "//build/config/linux/libdrm",
    "//skia",
    "//third_party/wayland:wayland_client",
    "//third_party/wayland-protocols:linux_dmabuf_protocol",
    "//third_party/wayland-protocols:presentation_time_protocol",
    "//third_party/wayland-protocols:vsync_feedback_protocol",
    "//ui/gfx/geometry",
    "//ui/gl",
  ]
}

source_set("client_version_test") {
  sources = [
    "clients/test/client_version_test.cc",
    "clients/test/client_version_test.h",
  ]

  deps = [
    ":client_support",
    "//base",
    "//third_party/wayland:wayland_client",
  ]

  public_deps = []
}

source_set("fullscreen_shell") {
  sources = [
    "clients/fullscreen_shell.cc",
    "clients/fullscreen_shell.h",
  ]

  deps = [
    ":client_support",
    "//base",
    "//build/config/linux/libdrm",
    "//skia",
    "//third_party/wayland:wayland_client",
    "//third_party/wayland-protocols:linux_dmabuf_protocol",
    "//third_party/wayland-protocols:presentation_time_protocol",
    "//ui/gfx/geometry",
    "//ui/gl",
  ]
}

executable("wayland_simple_client") {
  sources = [ "clients/simple_main.cc" ]
  deps = [
    ":client_support",
    ":simple",
    "//base",
  ]
}

executable("wayland_client_version_binding") {
  sources = [ "clients/test/client_version_binding_main.cc" ]
  deps = [
    ":client_support",
    ":client_version_test",
    "//base",
  ]
}

executable("wayland_fullscreen_client") {
  sources = [ "clients/fullscreen_shell_main.cc" ]
  deps = [
    ":client_support",
    ":fullscreen_shell",
    "//base",
  ]
}

executable("wayland_subsurface_client") {
  sources = [ "clients/subsurface.cc" ]

  deps = [
    ":client_support",
    "//base",
    "//build/config/linux/libdrm",
    "//skia",
    "//third_party/wayland:wayland_client",
    "//third_party/wayland-protocols:linux_dmabuf_protocol",
    "//third_party/wayland-protocols:presentation_time_protocol",
    "//ui/gfx/geometry",
    "//ui/gl",
  ]
}

source_set("blur") {
  sources = [
    "clients/blur.cc",
    "clients/blur.h",
  ]

  deps = [
    ":client_support",
    "//base",
    "//build/config/linux/libdrm",
    "//skia",
    "//third_party/wayland:wayland_client",
    "//ui/gfx/geometry",
    "//ui/gl",
  ]
}

executable("wayland_blur_client") {
  sources = [ "clients/blur_main.cc" ]
  deps = [
    ":blur",
    ":client_support",
    "//base",
  ]
}

executable("wayland_info_client") {
  sources = [ "clients/info.cc" ]

  deps = [
    ":client_support",
    "//base",
    "//third_party/wayland:wayland_client",
    "//ui/gfx/geometry",
  ]
}

executable("wayland_fractional_scale_client") {
  sources = [ "clients/fractional_scale.cc" ]

  deps = [
    ":client_support",
    "//base",
    "//skia",
    "//third_party/wayland:wayland_client",
    "//third_party/wayland-protocols:fractional_scale_protocol",
    "//ui/gfx/geometry:geometry_skia",
  ]
}

loadable_module("exo_wlcs") {
  testonly = true
  sources = [
    "test/wlcs/display_server.cc",
    "test/wlcs/display_server.h",
    "test/wlcs/exo_wlcs.cc",
    "test/wlcs/pointer.cc",
    "test/wlcs/pointer.h",
    "test/wlcs/touch.cc",
    "test/wlcs/touch.h",
    "test/wlcs/wlcs_helpers.cc",
    "test/wlcs/wlcs_helpers.h",
  ]

  deps = [
    "//ash",
    "//ash:test_support",
    "//base",
    "//base/test:test_config",
    "//components/exo",
    "//components/exo/wayland",
    "//components/exo/wayland:wayland_client_test_helper",
    "//components/exo/wayland/fuzzer:server_environment",
    "//skia",
    "//third_party/wayland:wayland_client",
    "//third_party/wayland:wayland_util",
    "//ui/events:test_support",
  ]
}

source_set("wayland_client_test_helper") {
  testonly = true

  sources = [
    "clients/test/wayland_client_test.cc",
    "clients/test/wayland_client_test.h",
    "clients/test/wayland_client_test_helper.cc",
    "clients/test/wayland_client_test_helper.h",
    "clients/test/wayland_client_test_server.cc",
    "clients/test/wayland_client_test_server.h",
  ]

  public_deps = [ "//testing/gtest" ]
  deps = [
    ":wayland",
    "//ash",
    "//ash:test_support",
    "//base",
    "//base/test:test_support",
    "//cc:test_support",
    "//chromeos/ash/components:test_support",
    "//components/exo",
    "//components/exo:test_support",
    "//components/exo/wayland",
    "//components/viz/test:test_support",
    "//mojo/core/embedder",
    "//ui/aura",
    "//ui/aura:test_support",
    "//ui/events:gesture_detection",
    "//ui/wm",
  ]
}

test("wayland_client_tests") {
  testonly = true
  use_xvfb = use_xvfb_in_this_config

  sources = [
    "clients/interface_binding_test.cc",
    "clients/test/run_all_client_tests.cc",
  ]

  deps = [
    ":client_support",
    ":client_version_test",
    ":wayland_client_test_helper",
    "//components/exo",
    "//components/exo/wayland",
    "//ui/base",
    "//ui/color:color",
    "//ui/gl:test_support",
  ]
}

test("wayland_client_perftests") {
  use_xvfb = use_xvfb_in_this_config

  sources = [
    "clients/perftests.cc",
    "clients/test/run_all_client_tests.cc",
  ]

  deps = [
    ":blur",
    ":client_support",
    ":client_version_test",
    ":simple",
    ":wayland_client_test_helper",
    "//base/test:test_support",
    "//cc:test_support",
    "//components/viz/test:test_support",
    "//mojo/core/embedder",
    "//testing/gtest",
    "//testing/perf",
    "//ui/aura:test_support",
    "//ui/base",
    "//ui/color:color",
    "//ui/compositor:test_support",
    "//ui/gl:test_support",
  ]
}

test("wayland_client_compatibility_tests") {
  testonly = true

  sources = [
    "compatibility_test/client_compatibility_test.cc",
    "compatibility_test/client_compatibility_test.h",
    "compatibility_test/client_compatibility_test_server.cc",
    "compatibility_test/wayland_client_event_receiver_version_fixtures.h",
    "compatibility_test/wayland_client_event_recorder.cc",
    "compatibility_test/wayland_client_event_recorder.h",
    "compatibility_test/wayland_client_registry.cc",
    "compatibility_test/wayland_client_registry.h",
  ]

  deps = [
    ":wayland",
    ":wayland_client_test_helper",
    "//ash:test_support",
    "//base",
    "//base/test:test_support",
    "//components/exo/wayland/compatibility_test",
    "//components/exo/wayland/compatibility_test:generated_client_helper_headers",
    "//components/viz/test:test_support",
    "//mojo/core/embedder:embedder",
    "//ui/color:color",
    "//ui/gl:test_support",
  ]

  data_deps = []
}

if (ozone_platform_drm) {
  test("wayland_client_integration_tests") {
    sources = [
      "test/integration/buffer_checker_test.cc",
      "test/integration/wayland_client_integration_tests_main.cc",
    ]
    deps = [
      ":client_support",
      "//base",
      "//base/test:test_support",
      "//build/config/linux/libdrm",
      "//ui/gfx:gfx",
      "//ui/gfx/linux:drm",
      "//ui/gfx/linux:gbm",
      "//ui/gl",
    ]
  }

  executable("wayland_yuv_client") {
    sources = [ "clients/yuv.cc" ]

    deps = [
      ":client_support",
      "//base",
      "//build/config/linux/libdrm",
      "//skia",
      "//third_party/wayland:wayland_client",
      "//third_party/wayland-protocols:linux_dmabuf_protocol",
      "//third_party/wayland-protocols:presentation_time_protocol",
      "//ui/gfx/geometry",
    ]

    deps += [ "//third_party/minigbm" ]
  }

  executable("wayland_hdr_client") {
    sources = [ "clients/hdr.cc" ]

    deps = [
      ":client_support",
      "//base",
      "//build/config/linux/libdrm",
      "//components/exo/wayland/protocol:chrome_color_management_protocol",
      "//skia",
      "//third_party/wayland:wayland_client",
      "//third_party/wayland-protocols:linux_dmabuf_protocol",
      "//third_party/wayland-protocols:presentation_time_protocol",
      "//ui/gfx/geometry",
    ]

    deps += [ "//third_party/minigbm" ]
  }

  executable("wayland_explicit_synchronization_client") {
    sources = [ "clients/explicit_synchronization.cc" ]

    deps = [
      ":client_support",
      "//base",
      "//build/config/linux/libdrm",
      "//skia",
      "//third_party/wayland:wayland_client",
      "//third_party/wayland-protocols:linux_explicit_synchronization_protocol",
      "//ui/gl",
    ]
  }

  if (enable_vulkan) {
    executable("wayland_vulkan_client") {
      sources = [ "clients/vulkan.cc" ]

      deps = [
        ":client_support",
        "//base",
        "//build/config/linux/libdrm",
        "//gpu/vulkan/init",
        "//skia",
        "//third_party/wayland:wayland_client",
        "//third_party/wayland-protocols:linux_dmabuf_protocol",
        "//third_party/wayland-protocols:presentation_time_protocol",
        "//ui/gfx/geometry",
      ]

      deps += [ "//third_party/minigbm" ]
    }
  }
}