chromium: Backport important fixes for Wayland
This is 843508dad4
for M97 (upstream didn't backport them so far).
This commit is contained in:
parent
fcb92f6d7e
commit
a8affa912c
@ -161,13 +161,23 @@ let
|
||||
./patches/no-build-timestamps.patch
|
||||
# For bundling Widevine (DRM), might be replaceable via bundle_widevine_cdm=true in gnFlags:
|
||||
./patches/widevine-79.patch
|
||||
] ++ lib.optionals (versionRange "98" "99") [
|
||||
] ++ lib.optionals (versionRange "97" "98") [
|
||||
# A critical Ozone/Wayland fix:
|
||||
# (Note: The patch for surface_augmenter.cc doesn't apply on M97 so we extract that part.)
|
||||
(fetchpatch {
|
||||
# [linux/wayland] Fixed terminate caused by binding to wrong version.
|
||||
url = "https://github.com/chromium/chromium/commit/dd4c3ddadbb9869f59cee201a38e9ca3b9154f4d.patch";
|
||||
excludes = [ "ui/ozone/platform/wayland/host/surface_augmenter.cc" ];
|
||||
sha256 = "sha256-lp4kxPNAkafdE9NfD3ittTCpomRpX9Hqhtt9GFf4Ntw=";
|
||||
})
|
||||
./patches/m97-ozone-wayland-fix-surface_augmenter.patch
|
||||
] ++ lib.optionals (versionRange "98" "99") [
|
||||
(githubPatch {
|
||||
# [linux/wayland] Fixed terminate caused by binding to wrong version.
|
||||
commit = "dd4c3ddadbb9869f59cee201a38e9ca3b9154f4d";
|
||||
sha256 = "sha256-FH7lBQTruMzkBT2XQ+kgADmJA0AxJfaV/gvtoqfQ4a4=";
|
||||
})
|
||||
] ++ lib.optionals (versionRange "97" "99") [
|
||||
(githubPatch {
|
||||
# [linux/wayland] Fixed terminate caused by binding to wrong version. (fixup)
|
||||
commit = "a84b79daa8897b822336b8f348ef4daaae07af37";
|
||||
|
@ -0,0 +1,31 @@
|
||||
diff --git a/ui/ozone/platform/wayland/host/surface_augmenter.cc b/ui/ozone/platform/wayland/host/surface_augmenter.cc
|
||||
index d971d15e71426..6e5408398bcea 100644
|
||||
--- a/ui/ozone/platform/wayland/host/surface_augmenter.cc
|
||||
+++ b/ui/ozone/platform/wayland/host/surface_augmenter.cc
|
||||
@@ -13,7 +13,8 @@
|
||||
namespace ui {
|
||||
|
||||
namespace {
|
||||
-constexpr uint32_t kMaxSurfaceAugmenterVersion = 1;
|
||||
+constexpr uint32_t kMinVersion = 1;
|
||||
+constexpr uint32_t kMaxVersion = 1;
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -27,11 +28,13 @@ void SurfaceAugmenter::Instantiate(WaylandConnection* connection,
|
||||
uint32_t version) {
|
||||
DCHECK_EQ(interface, kInterfaceName);
|
||||
|
||||
- if (connection->surface_augmenter_)
|
||||
+ if (connection->surface_augmenter_ ||
|
||||
+ !wl::CanBind(interface, version, kMinVersion, kMaxVersion)) {
|
||||
return;
|
||||
+ }
|
||||
|
||||
- auto augmenter = wl::Bind<surface_augmenter>(
|
||||
- registry, name, std::min(version, kMaxSurfaceAugmenterVersion));
|
||||
+ auto augmenter = wl::Bind<surface_augmenter>(registry, name,
|
||||
+ std::min(version, kMaxVersion));
|
||||
if (!augmenter) {
|
||||
LOG(ERROR) << "Failed to bind surface_augmenter";
|
||||
return;
|
Loading…
Reference in New Issue
Block a user