chromium: update to 83.0.4103.116.

[ci skip]

- Built for x86_64 and x86_64-musl.
- Tested on x86_64.

- Turn on vaapi build option by default.  With this build option, the
  chromium package now supports VA-API for Intel and AMD GPUs.

  However, users must opt-in to enabling this feature at run-time by
  enabling "Override software rendering list" in chrome://flags or by
  passing the --ignore-gpu-blacklist to chromium.  Otherwise this
  feature is disabled and not used.

  This has been tested with YouTube with multiple Intel GPUs.

- Add ffmpeg patch to workaround some problems with ffmpeg 4.3:
  https://bugs.chromium.org/p/chromium/issues/detail?id=1095962
This commit is contained in:
Peter Bui 2020-07-10 11:34:30 -04:00 committed by John Zimmermann
parent 293c8a41e6
commit 5fce08a6c5
4 changed files with 123 additions and 4 deletions

View file

@ -0,0 +1,41 @@
https://bugs.chromium.org/p/chromium/issues/detail?id=1095962
--- media/base/media.cc
+++ media/base/media.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <limits>
+
#include "media/base/media.h"
#include "base/allocator/buildflags.h"
@@ -41,7 +43,7 @@
#if BUILDFLAG(USE_ALLOCATOR_SHIM)
// Remove allocation limit from ffmpeg, so calls go down to shim layer.
- av_max_alloc(0);
+ av_max_alloc(std::numeric_limits<size_t>::max());
#endif // BUILDFLAG(USE_ALLOCATOR_SHIM)
#endif // BUILDFLAG(ENABLE_FFMPEG)
--- third_party/ffmpeg/chromium/dllmain.cc
+++ third_party/ffmpeg/chromium/dllmain.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <intrin.h>
+#include <limits>
#include <new.h>
#include <stdlib.h>
#include <windows.h>
@@ -28,7 +29,7 @@
if (reason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(instance);
// Remove allocation limit from ffmpeg, so calls go down to shim layer.
- av_max_alloc(0);
+ av_max_alloc(std::numeric_limits<size_t>::max());
// Enable OOM crashes in the shim for all malloc calls that fail.
_set_new_mode(1);
_set_new_handler(&OnNoMemory);

View file

@ -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
--- media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+++ media/gpu/vaapi/vaapi_video_decode_accelerator.cc
@@ -66,6 +66,7 @@ void ReportToUMA(VAVDADecoderFailure fai
VAVDA_DECODER_FAILURES_MAX + 1);
}
+#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
@@ -78,6 +79,7 @@ bool IsGeminiLakeOrLater() {
cpuid.model() >= kGeminiLakeModelId;
return is_geminilake_or_later;
}
+#endif
} // namespace
@@ -1155,6 +1157,8 @@ VaapiVideoDecodeAccelerator::DecideBuffe
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
@@ -1171,6 +1175,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
num_extra_pics_ = 3;
return BufferAllocationMode::kNone;
}
+#endif
// If we're here, we have to use the Vpp unit and allocate buffers for
// |decoder_|; usually we'd have to allocate the |decoder_|s

View file

@ -0,0 +1,38 @@
From 192fc3899f76e9487d77895f31df8d2d13bf9619 Mon Sep 17 00:00:00 2001
From: Dale Curtis <dalecurtis@chromium.org>
Date: Fri, 26 Jun 2020 01:10:55 +0000
Subject: [PATCH] Force mp3 files to have a start time of zero.
This will allow us to remove our custom patch which breaks upstream
ffmpeg functionality for unknown reasons.
R=sandersd
Fixed: 1062037
Change-Id: I253011843dee4dd6a8c958b14990ad836a9f1dca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2268221
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782792}
---
media/filters/ffmpeg_demuxer.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 01266e1a072..a7ed542b5fc 100644
--- media/filters/ffmpeg_demuxer.cc
+++ media/filters/ffmpeg_demuxer.cc
@@ -1522,6 +1522,12 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) {
if (glue_->container() == container_names::CONTAINER_AVI)
format_context->flags |= AVFMT_FLAG_GENPTS;
+ // FFmpeg will incorrectly adjust the start time of MP3 files into the future
+ // based on discard samples. We were unable to fix this upstream without
+ // breaking ffmpeg functionality. https://crbug.com/1062037
+ if (glue_->container() == container_names::CONTAINER_MP3)
+ start_time_ = base::TimeDelta();
+
// For testing purposes, don't overwrite the timeline offset if set already.
if (timeline_offset_.is_null()) {
timeline_offset_ =

View file

@ -1,15 +1,15 @@
# Template file for 'chromium'
pkgname=chromium
# See http://www.chromium.org/developers/calendar for the latest version
version=83.0.4103.106
revision=2
version=83.0.4103.116
revision=1
archs="i686 x86_64*"
short_desc="Google's attempt at creating a safer, faster, and more stable browser"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://www.chromium.org/"
distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz"
checksum=cfd153a2e10b0bb0fb3b7e6be543aef0915181f5fbdbea893d08465afd097e2f
checksum=bb0c7e8dfee9f3a5e30eca7f34fc9f21caefa82a86c058c552f52b1ae2da2ac3
lib32disabled=yes
nodebug=yes
@ -36,7 +36,7 @@ makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel
ffmpeg-devel libva-devel python-setuptools $(vopt_if sndio sndio-devel)"
depends="libexif hwids desktop-file-utils hicolor-icon-theme xdg-utils"
build_options_default="clang pulseaudio"
build_options_default="clang pulseaudio vaapi"
case "${XBPS_TARGET_MACHINE}" in
x86_64|i686) build_options_default+=" js_optimize" ;;