From c30a6232df03e1efbd9f3b226777b07e087a1122 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 12 Oct 2020 14:27:29 +0200 Subject: BASELINE: Update Chromium to 85.0.4183.140 Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen --- chromium/components/exo/wayland/server.cc | 35 ++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'chromium/components/exo/wayland/server.cc') diff --git a/chromium/components/exo/wayland/server.cc b/chromium/components/exo/wayland/server.cc index 281e49f7876..7aadc0b13fc 100644 --- a/chromium/components/exo/wayland/server.cc +++ b/chromium/components/exo/wayland/server.cc @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -60,6 +61,7 @@ #if defined(OS_CHROMEOS) #include "components/exo/wayland/wl_shell.h" +#include "components/exo/wayland/xdg_shell.h" #include "components/exo/wayland/zcr_color_space.h" #include "components/exo/wayland/zcr_cursor_shapes.h" #include "components/exo/wayland/zcr_gaming_input.h" @@ -79,6 +81,7 @@ #if defined(USE_OZONE) #include #include "components/exo/wayland/zwp_linux_dmabuf.h" +#include "ui/ozone/public/ozone_platform.h" #endif #if defined(USE_FULLSCREEN_SHELL) @@ -104,6 +107,18 @@ const base::FilePath::CharType kSocketName[] = FILE_PATH_LITERAL("wayland-0"); // Group used for wayland socket. const char kWaylandSocketGroup[] = "wayland"; +bool IsDrmAtomicAvailable() { +#if defined(USE_OZONE) + auto& host_properties = + ui::OzonePlatform::GetInstance()->GetInitializedHostProperties(); + return host_properties.supports_overlays; +#else + LOG(WARNING) << "Ozone disabled, cannot determine whether DrmAtomic is " + "present. Assuming it is not"; + return false; +#endif +} + } // namespace //////////////////////////////////////////////////////////////////////////////// @@ -150,9 +165,14 @@ Server::Server(Display* display) wl_global_create(wl_display_.get(), &wl_seat_interface, kWlSeatVersion, seat_data_.get(), bind_seat); - wl_global_create(wl_display_.get(), - &zwp_linux_explicit_synchronization_v1_interface, 1, - display_, bind_linux_explicit_synchronization); + if (IsDrmAtomicAvailable()) { + // The release fence needed by linux-explicit-sync comes from DRM-atomic. + // If DRM atomic is not supported, linux-explicit-sync interface is + // disabled. + wl_global_create(wl_display_.get(), + &zwp_linux_explicit_synchronization_v1_interface, 1, + display_, bind_linux_explicit_synchronization); + } wl_global_create(wl_display_.get(), &zaura_shell_interface, kZAuraShellVersion, display_, bind_aura_shell); #if defined(OS_CHROMEOS) @@ -192,10 +212,15 @@ Server::Server(Display* display) wl_global_create(wl_display_.get(), &zwp_text_input_manager_v1_interface, 1, zwp_text_manager_data_.get(), bind_text_input_manager); + zxdg_shell_data_ = + std::make_unique(display_, serial_tracker_.get()); + wl_global_create(wl_display_.get(), &zxdg_shell_v6_interface, 1, + zxdg_shell_data_.get(), bind_zxdg_shell_v6); + xdg_shell_data_ = std::make_unique(display_, serial_tracker_.get()); - wl_global_create(wl_display_.get(), &zxdg_shell_v6_interface, 1, - xdg_shell_data_.get(), bind_xdg_shell_v6); + wl_global_create(wl_display_.get(), &xdg_wm_base_interface, 1, + xdg_shell_data_.get(), bind_xdg_shell); #endif #if defined(USE_FULLSCREEN_SHELL) -- cgit v1.2.1