| # Copyright 2015 The Chromium Authors. All rights reserved. |
| # 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("//components/exo/buildflags.gni") |
| import("//gpu/vulkan/features.gni") |
| import("//testing/test.gni") |
| import("//ui/base/ui_features.gni") |
| |
| source_set("wayland") { |
| sources = [ |
| "scoped_wl.cc", |
| "scoped_wl.h", |
| "serial_tracker.cc", |
| "serial_tracker.h", |
| "server.cc", |
| "server.h", |
| "server_util.cc", |
| "server_util.h", |
| "wayland_display_observer.cc", |
| "wayland_display_observer.h", |
| "wayland_display_output.cc", |
| "wayland_display_output.h", |
| "wayland_input_delegate.cc", |
| "wayland_input_delegate.h", |
| "wayland_pointer_delegate.cc", |
| "wayland_pointer_delegate.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_shm.cc", |
| "wl_shm.h", |
| "wl_subcompositor.cc", |
| "wl_subcompositor.h", |
| "wp_presentation.cc", |
| "wp_presentation.h", |
| "wp_viewporter.cc", |
| "wp_viewporter.h", |
| "zaura_shell.cc", |
| "zaura_shell.h", |
| "zcr_alpha_compositing.cc", |
| "zcr_alpha_compositing.h", |
| "zcr_secure_output.cc", |
| "zcr_secure_output.h", |
| "zcr_stylus.cc", |
| "zcr_stylus.h", |
| "zcr_vsync_feedback.cc", |
| "zcr_vsync_feedback.h", |
| "zwp_linux_explicit_synchronization.cc", |
| "zwp_linux_explicit_synchronization.h", |
| ] |
| |
| defines = [ "EXO_IMPLEMENTATION" ] |
| |
| deps = [ |
| "//base", |
| "//build:chromeos_buildflags", |
| "//components/exo", |
| "//components/exo:buildflags", |
| "//components/exo/wayland/protocol:aura_shell_protocol", |
| "//device/gamepad", |
| "//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:color_space_protocol", |
| "//third_party/wayland-protocols:cursor_shapes_protocol", |
| "//third_party/wayland-protocols:extended_drag", |
| "//third_party/wayland-protocols:gaming_input_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: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: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: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/aura", |
| "//ui/base", |
| "//ui/base/dragdrop/mojom:mojom_shared", |
| "//ui/display/manager", |
| "//ui/events:dom_keycode_converter", |
| "//ui/events:events_base", |
| "//ui/events/devices:devices", |
| "//ui/views", |
| "//ui/wm:wm", |
| "//ui/wm/public", |
| ] |
| |
| if (use_ozone) { |
| sources += [ |
| "zwp_linux_dmabuf.cc", |
| "zwp_linux_dmabuf.h", |
| ] |
| |
| deps += [ |
| "//build/config/linux/libdrm", |
| "//third_party/wayland-protocols:linux_dmabuf_protocol", |
| "//ui/ozone", |
| ] |
| |
| if (is_chromeos_ash) { |
| deps += [ |
| "//ash", |
| "//ash/public/cpp", |
| "//chromeos/ui/base", |
| ] |
| } |
| } |
| |
| if (use_xkbcommon) { |
| deps += [ "//ui/events/keycodes:xkb" ] |
| } |
| |
| if (is_chromecast) { |
| defines += [ "USE_FULLSCREEN_SHELL" ] |
| sources += [ |
| "zwp_fullscreen_shell.cc", |
| "zwp_fullscreen_shell.h", |
| ] |
| deps += [ "//third_party/wayland-protocols:fullscreen_shell_protocol" ] |
| } |
| |
| if (is_chromeos_ash) { |
| sources += [ |
| "wayland_keyboard_delegate.cc", |
| "wayland_keyboard_delegate.h", |
| "wayland_positioner.cc", |
| "wayland_positioner.h", |
| "wl_shell.cc", |
| "wl_shell.h", |
| "xdg_shell.cc", |
| "xdg_shell.h", |
| "zcr_color_space.cc", |
| "zcr_color_space.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_stylus_tools.cc", |
| "zcr_stylus_tools.h", |
| "zwp_input_timestamps_manager.cc", |
| "zwp_input_timestamps_manager.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", |
| "zxdg_shell.cc", |
| "zxdg_shell.h", |
| ] |
| |
| if (enable_color_manager) { |
| deps += [ "//third_party/wayland-protocols:color_management_protocol" ] |
| sources += [ |
| "zwp_color_manager.cc", |
| "zwp_color_manager.h", |
| ] |
| } |
| |
| deps += [ "//ui/base/cursor/mojom:cursor_type" ] |
| |
| if (enable_weston_test) { |
| testonly = true |
| deps += [ |
| "//third_party/wayland-protocols:weston_test", |
| "//ui/base:test_support", |
| ] |
| sources += [ |
| "weston_test.cc", |
| "weston_test.h", |
| ] |
| } |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ "server_unittest.cc" ] |
| |
| deps = [ |
| ":wayland", |
| "//base", |
| "//build:chromeos_buildflags", |
| "//components/exo", |
| "//components/exo:test_support", |
| "//components/exo/wayland/fuzzer:unit_tests", |
| "//components/exo/wayland/protocol:aura_shell_protocol", |
| "//skia", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/wayland:wayland_client", |
| ] |
| |
| if (is_chromeos_ash) { |
| sources += [ |
| "wayland_display_unittest.cc", |
| "wayland_keyboard_delegate_unittest.cc", |
| "wayland_positioner_unittest.cc", |
| "zaura_shell_unittest.cc", |
| "zcr_remote_shell_unittest.cc", |
| ] |
| deps += [ |
| "//ash", |
| "//ash:test_support", |
| "//ash/public/cpp", |
| "//third_party/wayland-protocols:xdg_shell_protocol", |
| "//ui/compositor", |
| "//ui/compositor:test_support", |
| "//ui/display", |
| "//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", |
| ] |
| |
| deps = [ |
| "//base", |
| "//gpu/vulkan:vulkan", |
| "//gpu/vulkan/init:init", |
| "//ui/gl", |
| "//ui/gl/init", |
| ] |
| |
| public_deps = [ |
| "//components/exo/wayland/protocol:aura_shell_protocol", |
| "//skia", |
| "//third_party/wayland:wayland_client", |
| "//third_party/wayland-protocols:alpha_compositing_protocol", |
| "//third_party/wayland-protocols:color_space_protocol", |
| "//third_party/wayland-protocols:cursor_shapes_protocol", |
| "//third_party/wayland-protocols:extended_drag", |
| "//third_party/wayland-protocols:fullscreen_shell_protocol", |
| "//third_party/wayland-protocols:gaming_input_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: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: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: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) { |
| configs += [ "//ui/gl:gl_config" ] |
| 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) { |
| configs += [ "//ui/gl:gl_config" ] |
| 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", |
| ] |
| |
| if (ozone_platform_drm) { |
| configs += [ "//ui/gl:gl_config" ] |
| } |
| } |
| |
| 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 = [] |
| |
| if (ozone_platform_drm) { |
| configs += [ "//ui/gl:gl_config" ] |
| } |
| } |
| |
| 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", |
| ] |
| |
| if (ozone_platform_drm) { |
| configs += [ "//ui/gl:gl_config" ] |
| } |
| } |
| |
| 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", |
| ] |
| |
| if (ozone_platform_drm) { |
| configs += [ "//ui/gl:gl_config" ] |
| } |
| } |
| |
| 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", |
| ] |
| |
| if (ozone_platform_drm) { |
| configs += [ "//ui/gl:gl_config" ] |
| } |
| } |
| |
| 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", |
| ] |
| } |
| |
| 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", |
| ] |
| |
| deps = [ |
| ":wayland", |
| "//base", |
| "//base/test:test_support", |
| "//cc:test_support", |
| "//components/exo", |
| "//components/exo/wayland", |
| "//components/viz/test:test_support", |
| "//mojo/core/embedder", |
| "//testing/gtest", |
| "//ui/aura", |
| "//ui/aura:test_support", |
| "//ui/events:gesture_detection", |
| "//ui/wm", |
| ] |
| |
| data_deps = [] |
| |
| if (is_chromeos_ash) { |
| data_deps += [ |
| "//ash/resources:ash_test_resources_100_percent", |
| "//ash/resources:ash_test_resources_200_percent", |
| "//ash/strings:ash_test_strings", |
| ] |
| |
| deps += [ |
| "//ash", |
| "//ash:test_support", |
| "//ash/public/cpp", |
| ] |
| } |
| } |
| |
| 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", |
| "//ui/base", |
| "//ui/gl:test_support", |
| ] |
| |
| data_deps = [] |
| |
| if (is_chromeos_ash) { |
| sources += [ |
| "../../../ash/test/ash_test_suite.cc", |
| "../../../ash/test/ash_test_suite.h", |
| ] |
| |
| data_deps += [ |
| "//ash/resources:ash_test_resources_100_percent", |
| "//ash/resources:ash_test_resources_200_percent", |
| "//ash/strings:ash_test_strings", |
| ] |
| |
| deps += [ |
| "//ash:test_support", |
| "//base/test: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/compositor:test_support", |
| "//ui/gl:test_support", |
| ] |
| |
| data_deps = [] |
| |
| if (is_chromeos_ash) { |
| sources += [ |
| "../../../ash/test/ash_test_suite.cc", |
| "../../../ash/test/ash_test_suite.h", |
| ] |
| |
| data_deps += [ |
| "//ash/resources:ash_test_resources_100_percent", |
| "//ash/resources:ash_test_resources_200_percent", |
| "//ash/strings:ash_test_strings", |
| ] |
| |
| deps += [ "//ash: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", |
| "//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/gl:test_support", |
| ] |
| |
| if (is_chromeos_ash) { |
| deps += [ "//ash:test_support" ] |
| } |
| |
| data_deps = [] |
| } |
| |
| if (ozone_platform_drm) { |
| 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", |
| ] |
| |
| configs += [ "//ui/gl:gl_config" ] |
| deps += [ "//third_party/minigbm" ] |
| } |
| |
| executable("wayland_color_space_client") { |
| sources = [ "clients/color_space.cc" ] |
| |
| deps = [ |
| ":client_support", |
| "//base", |
| "//build/config/linux/libdrm", |
| "//skia", |
| "//third_party/wayland:wayland_client", |
| "//third_party/wayland-protocols:color_space_protocol", |
| "//third_party/wayland-protocols:linux_dmabuf_protocol", |
| "//third_party/wayland-protocols:presentation_time_protocol", |
| "//ui/gfx/geometry", |
| ] |
| |
| configs += [ "//ui/gl:gl_config" ] |
| 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", |
| ] |
| |
| configs += [ "//ui/gl:gl_config" ] |
| } |
| |
| 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", |
| ] |
| |
| configs += [ "//ui/gl:gl_config" ] |
| deps += [ "//third_party/minigbm" ] |
| } |
| } |
| } |