diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-09-30 17:27:54 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-09-30 17:27:54 +0100 |
commit | f70a1bfc721336d4fc7dfb711c2f518a6b18cf16 (patch) | |
tree | e907cb121b30e3c1df1710719c0ddf4029597a47 /www-client/chromium | |
parent | db063b515939ab15261136b24e4bc44386335c0c (diff) |
gentoo resync : 30.09.2020
Diffstat (limited to 'www-client/chromium')
-rw-r--r-- | www-client/chromium/Manifest | 13 | ||||
-rw-r--r-- | www-client/chromium/chromium-86.0.4240.53.ebuild (renamed from www-client/chromium/chromium-86.0.4240.42.ebuild) | 0 | ||||
-rw-r--r-- | www-client/chromium/chromium-87.0.4270.0.ebuild (renamed from www-client/chromium/chromium-87.0.4263.3.ebuild) | 43 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-86-fix-vaapi-on-intel.patch | 40 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-87-fix-vaapi-build.patch | 177 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-87-ozone-deps.patch | 15 |
6 files changed, 264 insertions, 24 deletions
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest index 2dac6a3202ad..8634cf71b489 100644 --- a/www-client/chromium/Manifest +++ b/www-client/chromium/Manifest @@ -1,4 +1,7 @@ AUX chromium-84-mediaalloc.patch 1242 BLAKE2B 3545ea4f8d71a062f71c20f4fa3e1460dbd02d3512ce6445ac4f948582a51bdcbd98829eff9b01cb7b920313d1f849534c46a942eed209a56ca373da8e938b6b SHA512 7799be695afe24844aad35ee4ed2aeb338b36a06e29a7f8d8a9c5d2b2769167469b8cdfa3f8814e6976c26a2731fc73741dc1c0b095695e1a21bfd3db166f7b4 +AUX chromium-86-fix-vaapi-on-intel.patch 1719 BLAKE2B ec015786c717b81fe90f959679fe309faaf631ee5290ee470c02d28b83a72ba3984a8c1ac97d986569029942d3fc176a14d3415a7f3a1e8c70fb1917bf779d77 SHA512 0297d26fef8f18054f2a6d01b5224f6a1e6ec8359785f3c5411b5f5cf9c7ec194f7074632327e07e1a424e5d4bbe3b67f7276849aa8f1bbc5708cd68785b3887 +AUX chromium-87-fix-vaapi-build.patch 5714 BLAKE2B aeb3d172f9c27d80957782e17a5236ed731e45bc770477b311bfe08736b28b23d360c63833ed3c2c4c36bf71544767fbec9f9ec3286c05c69f94a210df84da96 SHA512 f4395a28215516f1bae621f1d75bb31ae8551e34e26437bb2117e329e81aba83b1dad8c01cd85559430950c6a9079b1515bf66b679d68b957bfb04ae58a599c4 +AUX chromium-87-ozone-deps.patch 442 BLAKE2B 679f82c94e0716200b0483c13e7fed89a549a5689640a64ad8b04ff6da4e484d6c5f29a0daeec29f5330b0483632b8d63d3d4fbe93aa8262363f136f3f4bf5fb SHA512 31bbaf5fb3d9629ee036a88725ffab3a724f6593790f5041c25496225ac105cb06b9b97c3685fb6d2d9d7bf75020a93a452a28e81eb817bce502a0c245c3085d AUX chromium-browser.xml 407 BLAKE2B 168d78b0855546ca559cfb51aff0bc85d5e6ae974c25eb76e4a02f6d11659489c6e40397a0b2f7bc1fda336fd2c6dd8c863fccc3340719210b41c7fef51927f4 SHA512 b767fb4fd1925029d95560fc14cb7ab12ae43b2fe923e92d75e733b9723cbe1dcdf6df041a2b62554e98b79b47ef3f6028c773e72e6fd53166a021d49657aeca AUX chromium-launcher-r5.sh 1556 BLAKE2B 0671bd8558cd98f3ce0281d35893a99388d45388629b0eaa31e141289ed641bf950fa717c4ead9e87803eebb2055ed97b0f8ad6537062e9d563f54c0a9a008cb SHA512 e5bb9c5fc2daabeef1740a0cb9fea67986a233d51cdcaa0b27ff365b0cf6182d9bf047df664dcccca64c6dc4d59d6246e4312c5e7fa16bb30b085c34934d5689 AUX chromium-launcher-r6.sh 1593 BLAKE2B a871bd572239552390b216c89269dfe132474e1f57bfd0429f605af8285634659725c550b701e537f56adf20cba2dcb27dd9dadd390366dedc147f1ee987f462 SHA512 c01cb376eae2871dfa7a488d96ac8cc3445230eeb0fbd865948c5b3b601820468e85f2f0b9b30fff940c736aded050b7802759b8562e6378747af93c1d4f08a3 @@ -6,11 +9,11 @@ AUX chromium.default 148 BLAKE2B 5ee5b582c59a6e4bef87bbb0e232e2470ad412b1fbbb3b9 DIST chromium-85-patchset-2.tar.xz 9724 BLAKE2B 929d6abe3a66db395a9cedc63510a6a0ed0d79057f92ade22fe26221bf46a63e88fb40d6e54e6ffa837d142ec5da22e2b428f3153db431e3389de0b230fa2aec SHA512 753ce53c2c10cf1abdce334086a633dfcb4543c86a2dccbee0ad1bc8a8a0b642cdd18e2277c67088a380a9fa2ca8fd655e2fc0b3a2931de3230afa046615cd0e DIST chromium-85.0.4183.121.tar.xz 833194480 BLAKE2B d91302792fc34730795815a39ba91878f1d6d33c7bb810a10efcea2e117c069a6493b3acb1e3d8a04b19d599335b60d70523f47c65c42080cbe0d3981255c264 SHA512 9d61a0782c012fe36467a10f008962d45f4eaa065f6812276d847f7563056124c9fd21d8376dda8ab64e4c3b793da0593bac9d39988bbd60221828084b534945 DIST chromium-86-patchset-6.tar.xz 7152 BLAKE2B 494b412caec2b3e3fd6c838ba4b61d499433f5a6043e4763efc424c811e405ed11461d8df2afe0aa22d898329ef82df0c43c47ae30f7c4a1c0c3f6e5b314e283 SHA512 68833c9dea6a7183ff42a2d432cf811b360c1237c36feed6b4f9163b61d7f98854ce73b33c58851cb800cf72311a638adeedb4555caf15f80b4bd6aca5039aef -DIST chromium-86.0.4240.42.tar.xz 825375252 BLAKE2B 9b2abf8c9158630cf89cb35106db7259cf99b6e9753446fd2fc5ce47ceb4f5bc37e68b92e26b80a9e3ab0bf972309b5fdf6326eb9a890d187959f5f95b2309e0 SHA512 8b0edac6b924d6f599c3051e06309824367951389cb18920e7d401ac56f65305b4d39b702cad92babe38c8ae3833f24accf5f436bb9aa5a525f52fcf6fa0603b -DIST chromium-87-patchset-3.tar.xz 8884 BLAKE2B 9f06f3e4afd53d633a01a5df197799ac54760b5608f202be0216fca80bba57cfbee78b0ea67290f12bccbf1bc150802f007914563f04903727ac15b92a3a68f9 SHA512 1fde82d4cc238a949b6aad7e5c2b7213c06dac49965873b7dcc270312a581421687f7726dbf6c28220c0e69379a5ccdadfc2a99fcdfe6c9f011f482266c177ef -DIST chromium-87.0.4263.3.tar.xz 830924908 BLAKE2B 8388732772ae84671a3cf90a04663a1f71d4ee51310bf494a9bcbb60867648ac30920ab5eca83b236784cb6f3bb44ecde94b5d74f92e22f5bddd456bc01308fe SHA512 071cc9f88ad7229619b101911202f9c0fa094c99238a20ade793a9e013e2bb497033fb1a1c4458218003f1892e4a3018ac103ea0bf28a44ea689cb4b4cb4c17d +DIST chromium-86.0.4240.53.tar.xz 825355604 BLAKE2B d7a74d2fb82c2f686f502932de79e081c13f5b4a2cf3afc5f01944f1bff9574ce5be6650b1b72443729bd014d4b869af09a08ad784fd1a5984ec8a6d0c7c1261 SHA512 874be536c589b1d6b5c28018de740af414ba431d6de5232047370f5c0e54c784971bde27b3410bfb077254a1e224d488a7d65c9205f8107eec521930c357c8c8 +DIST chromium-87-patchset-4.tar.xz 8100 BLAKE2B cf052203bb9ced993f051ebac51270da1482e59999d87aff24fa81d25cc0de228a92a00abb56e0caa91c3f045bdd9df7524d77b375b77f1a0c7c198cb05c7649 SHA512 bc7cb6ad99c7d45999d45e5c9df05d43c80c25212dafe3750146d2cb5b38a7239e32ac1e9bf245331ba7055c0a36e551131eab92ecea907e51878259416b59a9 +DIST chromium-87.0.4270.0.tar.xz 831037464 BLAKE2B f9b19b704e252b96c5a6861719828d3b08eee9128d753a8c264b21b0bd26cbc1e7a3d29909d4300e59246ac9c56b88e205f83efd024897915a8b77085fe5f160 SHA512 76cbf88b1390c2e64d6615e29763f00493b94beff5836c240833840b1b50fa782c137ebc66a81a6940f35052895bdc0098fefca5e6cc46f56dbc2b8b2184ca6f DIST setuptools-44.1.0.zip 858569 BLAKE2B f59f154e121502a731e51294ccd293d60ffccadacf51e23b53bf7ceba38858948b86783238061136c827ac3373ea7ea8e6253d4bb53f3f1dd69284568ec65a68 SHA512 4dfb0f42d334b835758e865a26ecd1e725711fa2b9c38ddc273b8b3849fba04527bc97436d11ba1e98f1a42922aa0f0b9032e32998273c705fac6e10735eacbf EBUILD chromium-85.0.4183.121.ebuild 26679 BLAKE2B 1154809a421f02f704d778efa340a29d8a5748ba784060cd39eaa5687d2bb04f46fee00fbb863e6987f7a6b6427ce2af1d5ac3b8551008bcf3cd64fd37fb058e SHA512 c3e7fbd0a29df9f84ad18b48816dd3228685dc601521e49bdd82762093c578a5b24d1793db3551314ee190736685d038da50be47ce1514e1c0e5a0b21a290316 -EBUILD chromium-86.0.4240.42.ebuild 27932 BLAKE2B c4790f812572d65541458b0c4840b6906ac5e620458771da2a6dd0d391107400d9b408b7a2e34ad50262bf5c65f90ede4dd226ddbb7ab4c00bb095d22f8cefbb SHA512 31530182e51266b233d1ecfb8ef8c4cde35843198a31c40351dffaf467ed64b5eca2441d507e9911a5c83d05eda2b1c88bd48eb61bb2d5828df4a18c169f3037 -EBUILD chromium-87.0.4263.3.ebuild 27679 BLAKE2B 7c6292c0a3272610c2165958887badfd141e550f3522f5a8eb9a6f19eb4bd3e1ccf9db50ad1e79791addbeacc27b4d743d9e0b29d5ef649b540948ef66dd75f9 SHA512 cc04be7036ea07aeb1e190c058b78f8cbfe4a7261b7a3b1eb13e1cad6275555a1de5135b4c91101cd8f006c002082c14a79faa94f7a94b0c4a5a5e9528079c46 +EBUILD chromium-86.0.4240.53.ebuild 27932 BLAKE2B c4790f812572d65541458b0c4840b6906ac5e620458771da2a6dd0d391107400d9b408b7a2e34ad50262bf5c65f90ede4dd226ddbb7ab4c00bb095d22f8cefbb SHA512 31530182e51266b233d1ecfb8ef8c4cde35843198a31c40351dffaf467ed64b5eca2441d507e9911a5c83d05eda2b1c88bd48eb61bb2d5828df4a18c169f3037 +EBUILD chromium-87.0.4270.0.ebuild 27833 BLAKE2B 2ae1c7438cc316f289f12a5fff2493097e1697139a49c66bf075f5bf05fd937a796fda73048117c576d111d67e1bed87cb595379896a2ef531ce4b0ac9433873 SHA512 37570e250504c1605da5f3486466f4ef7695e99d9911b4039c75c93741f97a6599f9f82a920a152dde9e57f9e45c3e18745132723b3088919932d95470b21f62 MISC metadata.xml 1712 BLAKE2B 07346b7372c3a52dd3c08b320527793f8fcd8be2308503145d6f7a7068d8113035559c7b2576ec009c9488364ed43837dc73581284e563e47b54a49028c9e22e SHA512 756cd5106e7680e33d1de45b5ad8a8154d9f4f7dedef865aa6e1b218d7b690ca8017a9e00696377a33a45aa03c77ecff91f42c6e0b00cf263396b700e5815c3a diff --git a/www-client/chromium/chromium-86.0.4240.42.ebuild b/www-client/chromium/chromium-86.0.4240.53.ebuild index fcb525d806f7..fcb525d806f7 100644 --- a/www-client/chromium/chromium-86.0.4240.42.ebuild +++ b/www-client/chromium/chromium-86.0.4240.53.ebuild diff --git a/www-client/chromium/chromium-87.0.4263.3.ebuild b/www-client/chromium/chromium-87.0.4270.0.ebuild index 35a5f4c1ced5..008abd293ee8 100644 --- a/www-client/chromium/chromium-87.0.4263.3.ebuild +++ b/www-client/chromium/chromium-87.0.4270.0.ebuild @@ -12,7 +12,7 @@ inherit check-reqs chromium-2 desktop flag-o-matic multilib ninja-utils pax-util DESCRIPTION="Open-source version of Google Chrome web browser" HOMEPAGE="https://chromium.org/" -PATCHSET="3" +PATCHSET="4" PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}" SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz https://files.pythonhosted.org/packages/ed/7b/bbf89ca71e722b7f9464ebffe4b5ee20a9e5c9a555a56e2d3914bb9119a6/setuptools-44.1.0.zip @@ -21,7 +21,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P} LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="component-build cups cpu_flags_arm_neon +hangouts headless +js-type-check kerberos official pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc wayland widevine" +IUSE="component-build cups cpu_flags_arm_neon +hangouts headless +js-type-check kerberos official pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +tcmalloc vaapi wayland widevine" RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )" REQUIRED_USE=" component-build? ( !suid ) @@ -41,6 +41,7 @@ COMMON_X_DEPEND=" x11-libs/libXtst:= x11-libs/libXScrnSaver:= x11-libs/libxcb:= + vaapi? ( >=x11-libs/libva-2.7:=[X,drm] ) " COMMON_DEPEND=" @@ -57,7 +58,6 @@ COMMON_DEPEND=" >=media-libs/harfbuzz-2.4.0:0=[icu(-)] media-libs/libjpeg-turbo:= media-libs/libpng:= - system-libvpx? ( >=media-libs/libvpx-1.8.2:=[postproc] ) pulseaudio? ( media-sound/pulseaudio:= ) system-ffmpeg? ( >=media-video/ffmpeg-4.3:= @@ -175,6 +175,10 @@ them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS in /etc/chromium/default. " +PATCHES=( + "${FILESDIR}/chromium-87-ozone-deps.patch" +) + pre_build_checks() { if [[ ${MERGE_TYPE} != binary ]]; then local -x CPP="$(tc-getCXX) -E" @@ -227,6 +231,10 @@ src_prepare() { python_setup eapply "${WORKDIR}/patches" + if use vaapi; then + eapply "${FILESDIR}/chromium-86-fix-vaapi-on-intel.patch" + eapply "${FILESDIR}/chromium-87-fix-vaapi-build.patch" + fi default @@ -304,6 +312,7 @@ src_prepare() { third_party/devscripts third_party/devtools-frontend third_party/devtools-frontend/src/front_end/third_party/acorn + third_party/devtools-frontend/src/front_end/third_party/axe-core third_party/devtools-frontend/src/front_end/third_party/chromium third_party/devtools-frontend/src/front_end/third_party/codemirror third_party/devtools-frontend/src/front_end/third_party/fabricjs @@ -347,6 +356,8 @@ src_prepare() { third_party/libsrtp third_party/libsync third_party/libudev + third_party/libvpx + third_party/libvpx/source/libvpx/third_party/x86inc third_party/libwebm third_party/libxml/chromium third_party/libyuv @@ -451,19 +462,6 @@ src_prepare() { if ! use system-icu; then keeplibs+=( third_party/icu ) fi - if ! use system-libvpx; then - keeplibs+=( third_party/libvpx ) - keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc ) - - # we need to generate ppc64 stuff because upstream does not ship it yet - # it has to be done before unbundling. - if use ppc64; then - pushd third_party/libvpx >/dev/null || die - mkdir -p source/config/linux/ppc64 || die - ./generate_gni.sh || die - popd >/dev/null || die - fi - fi if use tcmalloc; then keeplibs+=( third_party/tcmalloc ) fi @@ -483,6 +481,15 @@ src_prepare() { if use arm64 || use ppc64 ; then keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 ) fi + # we need to generate ppc64 stuff because upstream does not ship it yet + # it has to be done before unbundling. + if use ppc64; then + pushd third_party/libvpx >/dev/null || die + mkdir -p source/config/linux/ppc64 || die + ./generate_gni.sh || die + popd >/dev/null || die + fi + # Remove most bundled libraries. Some are still needed. build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die } @@ -562,9 +569,6 @@ src_configure() { if use system-icu; then gn_system_libraries+=( icu ) fi - if use system-libvpx; then - gn_system_libraries+=( libvpx ) - fi if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then # unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++ gn_system_libraries+=( libxml ) @@ -588,6 +592,7 @@ src_configure() { myconf_gn+=" use_cups=$(usex cups true false)" myconf_gn+=" use_kerberos=$(usex kerberos true false)" myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" + myconf_gn+=" use_vaapi=$(usex vaapi true false)" # TODO: link_pulseaudio=true for GN. diff --git a/www-client/chromium/files/chromium-86-fix-vaapi-on-intel.patch b/www-client/chromium/files/chromium-86-fix-vaapi-on-intel.patch new file mode 100644 index 000000000000..2e3f9a6fdc5d --- /dev/null +++ b/www-client/chromium/files/chromium-86-fix-vaapi-on-intel.patch @@ -0,0 +1,40 @@ +From 9ff06536caf7ea51aad9fd2bb649c858eaf7ee84 Mon Sep 17 00:00:00 2001 +From: Akarshan Biswas <akarshanbiswas@fedoraproject.org> +Date: Sat, 26 Oct 2019 10:06:30 +0530 +Subject: [PATCH] Move offending function to chromeos only + +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +@@ -58,6 +58,7 @@ unsigned int GetVaFormatForVideoCodecProfile(VideoCodecProfile profile) { + return VA_RT_FORMAT_YUV420; + } + ++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) + // Returns true if the CPU is an Intel Gemini Lake or later (including Kaby + // Lake) Cpu platform id's are referenced from the following file in kernel + // source arch/x86/include/asm/intel-family.h +@@ -70,6 +71,7 @@ bool IsGeminiLakeOrLater() { + cpuid.model() >= kGeminiLakeModelId; + return is_geminilake_or_later; + } ++#endif + + } // namespace + +@@ -1213,6 +1215,8 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() { + if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT) + return BufferAllocationMode::kNormal; + ++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) ++ // Move this to chromeOs only as it is causing problem in some intel linux drivers + // On Gemini Lake, Kaby Lake and later we can pass to libva the client's + // PictureBuffers to decode onto, which skips the use of the Vpp unit and its + // associated format reconciliation copy, avoiding all internal buffer +@@ -1228,6 +1232,7 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() { + num_extra_pics_ = 3; + return BufferAllocationMode::kNone; + } ++#endif + + // For H.264 on older devices, another +1 is experimentally needed for + // high-to-high resolution changes. diff --git a/www-client/chromium/files/chromium-87-fix-vaapi-build.patch b/www-client/chromium/files/chromium-87-fix-vaapi-build.patch new file mode 100644 index 000000000000..e230510fde7f --- /dev/null +++ b/www-client/chromium/files/chromium-87-fix-vaapi-build.patch @@ -0,0 +1,177 @@ +From 90c4cfb5355a36de6660df4ed0a1c405a830ca0e Mon Sep 17 00:00:00 2001 +From: Tom Anderson <thomasanderson@chromium.org> +Date: Tue, 15 Sep 2020 12:02:17 -0700 +Subject: [PATCH] [XProto] Fix VAAPI build + +Fixes the build after [1] broke it. + +[1] https://chromium-review.googlesource.com/c/chromium/src/+/2392140 + +Bug: 1066670, 1127532 +Change-Id: I340f91a1d4ba7214ea47fa4b1bb4a368fe5597f5 +R=mcasas +CC=tmathmeyer +--- + +diff --git a/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc b/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc +index 843cf22..91eb184 100644 +--- a/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc ++++ b/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc +@@ -7,6 +7,8 @@ + #include "media/gpu/vaapi/va_surface.h" + #include "media/gpu/vaapi/vaapi_wrapper.h" + #include "ui/base/ui_base_features.h" ++#include "ui/gfx/x/connection.h" ++#include "ui/gfx/x/xproto.h" + #include "ui/gl/gl_bindings.h" + #include "ui/gl/gl_image_egl_pixmap.h" + #include "ui/gl/scoped_binders.h" +@@ -16,24 +18,27 @@ + namespace { + + inline Pixmap CreatePixmap(const gfx::Size& size) { +- auto* display = gfx::GetXDisplay(); ++ auto* connection = x11::Connection::Get(); ++ auto* display = connection->display(); + if (!display) + return 0; + +- int screen = DefaultScreen(display); +- auto root = XRootWindow(display, screen); +- if (root == BadValue) +- return 0; ++ auto root = connection->default_root(); + +- XWindowAttributes win_attr = {}; +- // returns 0 on failure, see: +- // https://tronche.com/gui/x/xlib/introduction/errors.html#Status +- if (!XGetWindowAttributes(display, root, &win_attr)) ++ uint8_t depth = 0; ++ if (auto reply = connection->GetGeometry({root}).Sync()) ++ depth = reply->depth; ++ else + return 0; + + // TODO(tmathmeyer) should we use the depth from libva instead of root window? +- return XCreatePixmap(display, root, size.width(), size.height(), +- win_attr.depth); ++ auto pixmap = connection->GenerateId<x11::Pixmap>(); ++ auto req = connection->CreatePixmap( ++ {depth, pixmap, root, base::checked_cast<uint16_t>(size.width()), ++ base::checked_cast<uint16_t>(size.height())}); ++ if (req.Sync().error) ++ pixmap = x11::Pixmap::None; ++ return base::strict_cast<::Pixmap>(pixmap); + } + + } // namespace +@@ -71,11 +76,8 @@ + DCHECK_EQ(glGetError(), static_cast<GLenum>(GL_NO_ERROR)); + } + +- if (x_pixmap_) { +- if (auto* display = gfx::GetXDisplay()) { +- XFreePixmap(display, x_pixmap_); +- } +- } ++ if (x_pixmap_) ++ x11::Connection::Get()->FreePixmap({static_cast<x11::Pixmap>(x_pixmap_)}); + } + + Status VaapiPictureNativePixmapAngle::Allocate(gfx::BufferFormat format) { +diff --git a/media/gpu/vaapi/vaapi_picture_tfp.cc b/media/gpu/vaapi/vaapi_picture_tfp.cc +index 9ff0372..1c917a1 100644 +--- a/media/gpu/vaapi/vaapi_picture_tfp.cc ++++ b/media/gpu/vaapi/vaapi_picture_tfp.cc +@@ -7,6 +7,7 @@ + #include "media/gpu/vaapi/va_surface.h" + #include "media/gpu/vaapi/vaapi_wrapper.h" + #include "ui/base/ui_base_features.h" ++#include "ui/gfx/x/connection.h" + #include "ui/gfx/x/x11_types.h" + #include "ui/gl/gl_bindings.h" + #include "ui/gl/gl_image_glx.h" +@@ -33,7 +34,8 @@ + texture_id, + client_texture_id, + texture_target), +- x_display_(gfx::GetXDisplay()), ++ connection_(x11::Connection::Get()), ++ x_display_(connection_->display()), + x_pixmap_(0) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK(!features::IsUsingOzonePlatform()); +@@ -49,7 +51,7 @@ + } + + if (x_pixmap_) +- XFreePixmap(x_display_, x_pixmap_); ++ connection_->FreePixmap({static_cast<x11::Pixmap>(x_pixmap_)}); + } + + Status VaapiTFPPicture::Initialize() { +@@ -85,15 +87,20 @@ + } + + XWindowAttributes win_attr; +- int screen = DefaultScreen(x_display_); +- XGetWindowAttributes(x_display_, XRootWindow(x_display_, screen), &win_attr); ++ auto root = connection_->default_root(); ++ XGetWindowAttributes(x_display_, static_cast<::Window>(root), &win_attr); + // TODO(posciak): pass the depth required by libva, not the RootWindow's + // depth +- x_pixmap_ = XCreatePixmap(x_display_, XRootWindow(x_display_, screen), +- size_.width(), size_.height(), win_attr.depth); +- if (!x_pixmap_) { ++ auto pixmap = connection_->GenerateId<x11::Pixmap>(); ++ if (connection_ ++ ->CreatePixmap( ++ {win_attr.depth, pixmap, root, size_.width(), size_.height()}) ++ .Sync() ++ .error) { + DLOG(ERROR) << "Failed creating an X Pixmap for TFP"; + return StatusCode::kVaapiNoPixmap; ++ } else { ++ x_pixmap_ = static_cast<::Pixmap>(pixmap); + } + + return Initialize(); +diff --git a/media/gpu/vaapi/vaapi_picture_tfp.h b/media/gpu/vaapi/vaapi_picture_tfp.h +index c4eb2c1..a32955e 100644 +--- a/media/gpu/vaapi/vaapi_picture_tfp.h ++++ b/media/gpu/vaapi/vaapi_picture_tfp.h +@@ -11,6 +11,7 @@ + #include "base/memory/ref_counted.h" + #include "media/gpu/vaapi/vaapi_picture.h" + #include "ui/gfx/geometry/size.h" ++#include "ui/gfx/x/connection.h" + #include "ui/gl/gl_bindings.h" + + namespace gl { +@@ -47,6 +48,7 @@ + private: + Status Initialize(); + ++ x11::Connection* const connection_; + Display* x_display_; + + Pixmap x_pixmap_; +diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc +index 2ad0b997..a988233 100644 +--- a/media/gpu/vaapi/vaapi_wrapper.cc ++++ b/media/gpu/vaapi/vaapi_wrapper.cc +@@ -57,8 +57,13 @@ + #include "ui/gl/gl_implementation.h" + + #if defined(USE_X11) +-#include <va/va_x11.h> + #include "ui/gfx/x/x11_types.h" // nogncheck ++ ++typedef XID Drawable; ++ ++extern "C" { ++#include "media/gpu/vaapi/va_x11.sigs" ++} + #endif + + #if defined(USE_OZONE) diff --git a/www-client/chromium/files/chromium-87-ozone-deps.patch b/www-client/chromium/files/chromium-87-ozone-deps.patch new file mode 100644 index 000000000000..ceb693cea8b0 --- /dev/null +++ b/www-client/chromium/files/chromium-87-ozone-deps.patch @@ -0,0 +1,15 @@ +diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn +index 3f89c70..0df6490 100644 +--- a/chrome/browser/BUILD.gn ++++ b/chrome/browser/BUILD.gn +@@ -5056,7 +5056,9 @@ static_library("browser") { + "chrome_browser_main_extra_parts_ozone.cc", + "chrome_browser_main_extra_parts_ozone.h", + ] +- deps += [ "//ui/ozone" ] ++ if (use_ozone) { ++ deps += [ "//ui/ozone" ] ++ } + } + + if (enable_background_mode) { |