From 9c774f7c31983c6f023455a14d83a6b85c45d741 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich <kevin@archlinuxarm.org> Date: Wed, 2 Mar 2022 00:09:29 +0000 Subject: [PATCH] extra/chromium to 99.0.4844.51-1 --- .../0001-widevine-support-for-arm.patch | 14 +++--- ...-bindings-generation-single-threaded.patch | 2 +- ...003-Fix-eu-strip-build-for-newer-GCC.patch | 2 +- extra/chromium/PKGBUILD | 27 +++++----- ...eakpad-fix-for-non-constant-SIGSTKSZ.patch | 35 ------------- ...ngrade-duplicate-peer-error-to-dvlog.patch | 33 ------------- ...ne_MM_Var-in-CFX_Font-AdjustMMParams.patch | 29 ++++++----- ...ebcodecs-stop-using-AudioOpusEncoder.patch | 49 +++++++++++++++++++ 8 files changed, 84 insertions(+), 107 deletions(-) delete mode 100644 extra/chromium/breakpad-fix-for-non-constant-SIGSTKSZ.patch delete mode 100644 extra/chromium/downgrade-duplicate-peer-error-to-dvlog.patch create mode 100644 extra/chromium/webcodecs-stop-using-AudioOpusEncoder.patch diff --git a/extra/chromium/0001-widevine-support-for-arm.patch b/extra/chromium/0001-widevine-support-for-arm.patch index 08a05d3fd..bd3b781c9 100644 --- a/extra/chromium/0001-widevine-support-for-arm.patch +++ b/extra/chromium/0001-widevine-support-for-arm.patch @@ -1,4 +1,4 @@ -From 2c9098974b0be2d79c86faada645bbffbba2d989 Mon Sep 17 00:00:00 2001 +From 43b30a56ca5f08a2bb5f67fb81beeb328db5aba5 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich <kevin@archlinuxarm.org> Date: Thu, 18 Feb 2021 19:35:58 -0700 Subject: [PATCH 1/3] widevine support for arm @@ -8,15 +8,15 @@ Subject: [PATCH 1/3] widevine support for arm 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/widevine/cdm/widevine.gni b/third_party/widevine/cdm/widevine.gni -index 1a833ae57589c..42164ca5416eb 100644 +index 8c2d16bd54c9d..347a1c40986e1 100644 --- a/third_party/widevine/cdm/widevine.gni +++ b/third_party/widevine/cdm/widevine.gni -@@ -26,7 +26,7 @@ if (is_chromeos && !is_chromeos_device) { +@@ -25,7 +25,7 @@ if (is_chromeos && !is_chromeos_device) { + # supported via Android MediaDrm API. library_widevine_cdm_available = - (is_chromeos_ash && (target_cpu == "x64" || target_cpu == "arm")) || - ((target_os == "linux" || is_chromeos_lacros) && -- (target_cpu == "x86" || target_cpu == "x64")) || -+ (target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm")) || + (is_chromeos && (target_cpu == "x64" || target_cpu == "arm")) || +- (target_os == "linux" && target_cpu == "x64") || ++ (target_os == "linux" && (target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")) || (target_os == "mac" && (target_cpu == "x64" || target_cpu == "arm64")) || (target_os == "win" && (target_cpu == "x86" || target_cpu == "x64")) diff --git a/extra/chromium/0002-Run-blink-bindings-generation-single-threaded.patch b/extra/chromium/0002-Run-blink-bindings-generation-single-threaded.patch index 1edec45d6..911009f46 100644 --- a/extra/chromium/0002-Run-blink-bindings-generation-single-threaded.patch +++ b/extra/chromium/0002-Run-blink-bindings-generation-single-threaded.patch @@ -1,4 +1,4 @@ -From d4bc35d92065cbd407e061ecaca7c5daed71e7b6 Mon Sep 17 00:00:00 2001 +From b50eb0ab4e25c82778ed775f8ccc22c39cf89c5e Mon Sep 17 00:00:00 2001 From: Kevin Mihelich <kevin@archlinuxarm.org> Date: Tue, 2 Feb 2021 13:58:59 -0700 Subject: [PATCH 2/3] Run blink bindings generation single threaded diff --git a/extra/chromium/0003-Fix-eu-strip-build-for-newer-GCC.patch b/extra/chromium/0003-Fix-eu-strip-build-for-newer-GCC.patch index 09904396a..4253bc84e 100644 --- a/extra/chromium/0003-Fix-eu-strip-build-for-newer-GCC.patch +++ b/extra/chromium/0003-Fix-eu-strip-build-for-newer-GCC.patch @@ -1,4 +1,4 @@ -From 9f77fc4f9b6a7b205d8522422f0d43c72a6390ea Mon Sep 17 00:00:00 2001 +From d227652a975902f02c9ad1bfc2a09804c7324c70 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich <kevin@archlinuxarm.org> Date: Wed, 21 Jul 2021 21:37:31 -0600 Subject: [PATCH 3/3] Fix eu-strip build for newer GCC diff --git a/extra/chromium/PKGBUILD b/extra/chromium/PKGBUILD index 6b5e39f76..d8af85dc8 100644 --- a/extra/chromium/PKGBUILD +++ b/extra/chromium/PKGBUILD @@ -15,10 +15,10 @@ highmem=1 pkgname=chromium -pkgver=98.0.4758.102 -pkgrel=2 +pkgver=99.0.4844.51 +pkgrel=1 _launcher_ver=8 -_gcc_patchset=5 +_gcc_patchset=3 pkgdesc="A web browser built for speed, simplicity, and security" arch=('x86_64') url="https://www.chromium.org/Home" @@ -36,29 +36,27 @@ options=('!lto') # Chromium adds its own flags for ThinLTO source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz - downgrade-duplicate-peer-error-to-dvlog.patch fix-build-break-with-system-libdrm.patch sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch - breakpad-fix-for-non-constant-SIGSTKSZ.patch + webcodecs-stop-using-AudioOpusEncoder.patch use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch sql-make-VirtualCursor-standard-layout-type.patch use-oauth2-client-switches-as-default.patch 0001-widevine-support-for-arm.patch 0002-Run-blink-bindings-generation-single-threaded.patch 0003-Fix-eu-strip-build-for-newer-GCC.patch) -sha256sums=('415b47e912766cd07f9f52e95bc6470b835acf1d6f566ae32e66ba8be608f33e' +sha256sums=('97c52e57eca0dc8b752d274047f38c88aaa86036c0587b26b056efbd3fb2bae3' '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a' - 'f561145514e9d30a696a82f6a6a4eca06e664b58d7cda30dad9afb2cef341a4d' - '291c6a6ad44c06ae8d1b13433f0c4e37d280c70fb06eaa97a1cc9b0dcc122aaa' + '9cd2570e92e9bfeff3faf0d5b56334535cb2313f99ab0d9019b74d18ae1c7d0a' 'edf4d973ff197409d319bb6fbbaa529e53bc62347d26b0733c45a116a1b23f37' 'f910be9370c880de6e1d61cc30383c069e421d7acf406166e4fbfad324fc7d61' - 'b4d28867c1fabde6c50a2cfa3f784730446c4d86e5191e0f0000fbf7b0f91ecf' - '9c9c280be968f06d269167943680fb72a26fbb05d8c15f60507e316e8a9075d5' + '064daaa2b9d95b96ec04d8ddebf4af441f92263d123365b58fe73966866080af' + '34bcb151c0bc51ada5aa7beda6e87356e0eaafa83a621e11e5803717adc39ffc' 'b94b2e88f63cfb7087486508b8139599c89f96d7a4181c61fec4b4e250ca327a' 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711' - '717d167a72837361f016bbe2ef50b42defc28a095f0c0daadcfce56545bf9677' - 'c533c64de6c0c3d7675c96e032093255893305ab337394bf814da58342328b3f' - '7b14049f77b7f4f112f82eea3570e2e0d3bce4cc075466f699564f2795afbd2f') + '1518b4e3a89594f940f023da84ac3c222efb6f486596c44fe2b92419f15327ab' + '1e8539288b51d69d4491d19c523cc6335ab8bd0502222011de30604203ca5b3f' + '26509e6fbf67e1a6876c63df5040bfb592a2229b4786ccb06cafa418ce7bb733') # Possible replacements are listed in build/linux/unbundle/replace_gn_files.py # Keys are the names in the above script; values are the dependencies in Arch @@ -128,10 +126,9 @@ prepare() { patch -Np1 -i ../use-oauth2-client-switches-as-default.patch # Upstream fixes - patch -Np1 -F3 -i ../downgrade-duplicate-peer-error-to-dvlog.patch patch -Np1 -i ../fix-build-break-with-system-libdrm.patch patch -Np1 -i ../sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch - patch -Np1 -d third_party//breakpad/breakpad <../breakpad-fix-for-non-constant-SIGSTKSZ.patch + patch -Np1 -i ../webcodecs-stop-using-AudioOpusEncoder.patch patch -Np1 -d third_party/pdfium <../use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch # https://chromium-review.googlesource.com/c/chromium/src/+/2862724 diff --git a/extra/chromium/breakpad-fix-for-non-constant-SIGSTKSZ.patch b/extra/chromium/breakpad-fix-for-non-constant-SIGSTKSZ.patch deleted file mode 100644 index 1bb121693..000000000 --- a/extra/chromium/breakpad-fix-for-non-constant-SIGSTKSZ.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 605c51ed96ad44b34c457bbca320e74e194c317e Mon Sep 17 00:00:00 2001 -From: David Faure <david.faure@kdab.com> -Date: Wed, 15 Dec 2021 22:26:40 +0100 -Subject: [PATCH] Fix for non-constant SIGSTKSZ - -On glibc > 2.33, `SIGSTKSZ` might not be constant (in which case -it expands to a call to `sysconf` which returns a `long int`); see -https://sourceware.org/pipermail/libc-alpha/2020-October/118513.html - -Pass unsigned explicitly to std::max, to avoid relying on template -argument deduction. This works both with the old-style constant -`SIGSTKSZ` and the new configurable one. - -Initially based on https://chromium-review.googlesource.com/c/2776379 - -Change-Id: I9fc95337f973e871b84735ce822b5e11ba73ea8c -Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3340721 -Reviewed-by: Mark Mentovai <mark@chromium.org> ---- - src/client/linux/handler/exception_handler.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc -index ca353c40..499be0a9 100644 ---- a/src/client/linux/handler/exception_handler.cc -+++ b/src/client/linux/handler/exception_handler.cc -@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. -- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -+ const unsigned kSigStackSize = std::max<unsigned>(16384, SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. diff --git a/extra/chromium/downgrade-duplicate-peer-error-to-dvlog.patch b/extra/chromium/downgrade-duplicate-peer-error-to-dvlog.patch deleted file mode 100644 index 62d553e08..000000000 --- a/extra/chromium/downgrade-duplicate-peer-error-to-dvlog.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 00604ca8ed6d669fb6cb3ae8bacd6028d5ef10ac Mon Sep 17 00:00:00 2001 -From: Stephen Roettger <sroettger@google.com> -Date: Thu, 20 Jan 2022 10:04:04 +0000 -Subject: [PATCH] Downgrade duplicate peer error to dvlog -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Downgrading since this case can happen in non-error situations. There can be -duplicate introductions in flight in which case we simply drop the second one. - -Change-Id: I2c51b177913ccd9634e9bb6343d468101d9735ed -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3398794 -Reviewed-by: Ken Rockot <rockot@google.com> -Commit-Queue: Stephen Röttger <sroettger@google.com> -Cr-Commit-Position: refs/heads/main@{#961389} ---- - mojo/core/node_controller.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mojo/core/node_controller.cc b/mojo/core/node_controller.cc -index 7cde7719687..81712676733 100644 ---- a/mojo/core/node_controller.cc -+++ b/mojo/core/node_controller.cc -@@ -594,7 +594,7 @@ void NodeController::AddPeer(const ports::NodeName& name, - } - - if (dropped_peers_.Contains(name)) { -- LOG(ERROR) << "Trying to re-add dropped peer " << name; -+ DVLOG(1) << "Trying to re-add dropped peer " << name; - return; - } - diff --git a/extra/chromium/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch b/extra/chromium/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch index 5b9c0e353..0faf894a8 100644 --- a/extra/chromium/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch +++ b/extra/chromium/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch @@ -1,4 +1,4 @@ -From cb0aad687f34629a42053d600cf2947282cea2c0 Mon Sep 17 00:00:00 2001 +From ffeb67faf715475f6e463d65c368f556780adf19 Mon Sep 17 00:00:00 2001 From: Lei Zhang <thestig@chromium.org> Date: Mon, 31 Jan 2022 22:42:35 +0000 Subject: [PATCH] Use FT_Done_MM_Var() in CFX_Font::AdjustMMParams() when @@ -12,17 +12,15 @@ Change-Id: I044540893103921fc64cdd53fcd628cfebf2c9db Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90130 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> - -(cherry picked from commit ffeb67faf715475f6e463d65c368f556780adf19) --- core/fxge/cfx_font.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp -index 7a4e8eb24..0ef421fe7 100644 +index c08fe9608..8b3a72700 100644 --- a/core/fxge/cfx_font.cpp +++ b/core/fxge/cfx_font.cpp -@@ -43,6 +43,30 @@ struct OUTLINE_PARAMS { +@@ -44,6 +44,30 @@ struct OUTLINE_PARAMS { float m_CoordUnit; }; @@ -31,12 +29,12 @@ index 7a4e8eb24..0ef421fe7 100644 +// FT_Done_MM_Var() directly. +// +// Use weak symbols to check if FT_Done_MM_Var() is available at runtime. -+#if !defined(OS_WIN) ++#if !BUILDFLAG(IS_WIN) +extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var; +#endif + +void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) { -+#if defined(OS_WIN) ++#if BUILDFLAG(IS_WIN) + // Assume `use_system_freetype` GN var is never set on Windows. + constexpr bool has_ft_done_mm_var_func = true; +#else @@ -50,19 +48,20 @@ index 7a4e8eb24..0ef421fe7 100644 + } +} + - #ifdef PDF_ENABLE_XFA - unsigned long FTStreamRead(FXFT_StreamRec* stream, - unsigned long offset, -@@ -640,14 +664,14 @@ void CFX_Font::AdjustMMParams(int glyph_index, - int max_width = FXFT_Get_Glyph_HoriAdvance(m_Face->GetRec()) * 1000 / - FXFT_Get_Face_UnitsPerEM(m_Face->GetRec()); + FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) { + return FX_RECT(pdfium::base::checked_cast<int32_t>(left), + pdfium::base::checked_cast<int32_t>(top), +@@ -645,7 +669,7 @@ void CFX_Font::AdjustMMParams(int glyph_index, + FT_Pos max_width = FXFT_Get_Glyph_HoriAdvance(m_Face->GetRec()) * 1000 / + FXFT_Get_Face_UnitsPerEM(m_Face->GetRec()); if (max_width == min_width) { - FXFT_Free(m_Face->GetRec(), pMasters); + FreeMMVar(m_Face->GetRec(), pMasters); return; } - int param = min_param + (max_param - min_param) * (dest_width - min_width) / - (max_width - min_width); + FT_Pos param = min_param + (max_param - min_param) * +@@ -653,7 +677,7 @@ void CFX_Font::AdjustMMParams(int glyph_index, + (max_width - min_width); coords[1] = param; } - FXFT_Free(m_Face->GetRec(), pMasters); diff --git a/extra/chromium/webcodecs-stop-using-AudioOpusEncoder.patch b/extra/chromium/webcodecs-stop-using-AudioOpusEncoder.patch new file mode 100644 index 000000000..32957d32f --- /dev/null +++ b/extra/chromium/webcodecs-stop-using-AudioOpusEncoder.patch @@ -0,0 +1,49 @@ +From 3bd46cb9a51773f103ef52b39d6407740eb0d60a Mon Sep 17 00:00:00 2001 +From: Eugene Zemtsov <eugene@chromium.org> +Date: Thu, 24 Feb 2022 23:17:20 +0000 +Subject: [PATCH] webcodecs: Stop using AudioOpusEncoder as backed for mojo + audio encoder + +AudioOpusEncoder was only used here for testing. Let's not let it get +comfortable. We'll use MF AAC encoder here when we have it. (Soon...) + +Bug: 1259883 +Change-Id: Ia1819395c8c8fd6d403d4b8558c12f9a1bf7e761 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489449 +Commit-Queue: Eugene Zemtsov <eugene@chromium.org> +Auto-Submit: Eugene Zemtsov <eugene@chromium.org> +Reviewed-by: Dale Curtis <dalecurtis@chromium.org> +Commit-Queue: Dale Curtis <dalecurtis@chromium.org> +Cr-Commit-Position: refs/heads/main@{#974895} +--- + media/mojo/services/gpu_mojo_media_client.cc | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/media/mojo/services/gpu_mojo_media_client.cc b/media/mojo/services/gpu_mojo_media_client.cc +index 8f83a4d6cf6..40cdaff8d3a 100644 +--- a/media/mojo/services/gpu_mojo_media_client.cc ++++ b/media/mojo/services/gpu_mojo_media_client.cc +@@ -13,7 +13,6 @@ + #include "build/chromeos_buildflags.h" + #include "gpu/ipc/service/gpu_channel.h" + #include "media/audio/audio_features.h" +-#include "media/audio/audio_opus_encoder.h" + #include "media/base/audio_decoder.h" + #include "media/base/cdm_factory.h" + #include "media/base/media_switches.h" +@@ -119,14 +118,7 @@ std::unique_ptr<AudioEncoder> GpuMojoMediaClient::CreateAudioEncoder( + scoped_refptr<base::SequencedTaskRunner> task_runner) { + if (!base::FeatureList::IsEnabled(features::kPlatformAudioEncoder)) + return nullptr; +- // TODO(crbug.com/1259883) Right now Opus encoder is all we have, later on +- // we'll create a real platform encoder here. +- auto opus_encoder = std::make_unique<AudioOpusEncoder>(); +- auto encoding_runner = base::ThreadPool::CreateSequencedTaskRunner( +- {base::TaskPriority::USER_BLOCKING}); +- return std::make_unique<OffloadingAudioEncoder>(std::move(opus_encoder), +- std::move(encoding_runner), +- std::move(task_runner)); ++ return nullptr; + } + + VideoDecoderType GpuMojoMediaClient::GetDecoderImplementationType() {