chromium: enable VAAPI by default & fix on i686

The '--enable-gpu-rasterization' configure parameter is
required to enable VAAPI (hardware accelerated video
decoding). This commit adds this parameter to the
chromium wrapper script

[ci skip]
This commit is contained in:
Rasmus Thomsen 2018-11-29 17:14:41 +01:00 committed by maxice8
parent 1e2f872e37
commit 36e0a22416
4 changed files with 36 additions and 18 deletions

View file

@ -1,4 +1,5 @@
#!/bin/sh
export CHROME_WRAPPER=/usr/lib/chromium/chromium
export CHROME_DESKTOP=chromium.desktop
CHROME_FLAGS="--enable-gpu-rasterization"
exec /usr/lib/chromium/chromium $CHROME_FLAGS "$@"

View file

@ -0,0 +1,23 @@
--- media/gpu/vaapi/BUILD.gn.i686permissive 2018-11-29 09:27:02.405909871 -0500
+++ media/gpu/vaapi/BUILD.gn 2018-11-29 09:29:50.648259696 -0500
@@ -10,6 +10,11 @@ import("//ui/ozone/ozone.gni")
assert(use_vaapi)
+config("vaapi_permissive") {
+ cflags = [ "-fpermissive" ]
+}
+
+
action("libva_generate_stubs") {
extra_header = "va_stub_header.fragment"
@@ -98,6 +103,8 @@ source_set("vaapi") {
"//third_party/libyuv",
]
+ configs += [ ":vaapi_permissive" ]
+
if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [ "//ui/gfx/x" ]

View file

@ -2,11 +2,11 @@
pkgname=chromium
# See http://www.chromium.org/developers/calendar for the latest version
version=70.0.3538.110
revision=1
revision=2
short_desc="Google's attempt at creating a safer, faster, and more stable browser"
maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
homepage="https://www.chromium.org/"
license="BSD-3-Clause"
homepage="https://www.chromium.org/"
distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz"
checksum=445ef88fcf283206c1eba4faeb1c186c805e053d8b4ffeac1fcb88187bc1942f
@ -30,16 +30,11 @@ makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel
libjpeg-turbo-devel libevent-devel json-c-devel harfbuzz-devel
minizip-devel jsoncpp-devel zlib-devel libcap-devel libXdamage-devel
re2-devel fontconfig-devel freetype-devel harfbuzz-devel opus-devel
ffmpeg-devel"
ffmpeg-devel libva-devel"
depends="libexif hwids desktop-file-utils hicolor-icon-theme"
build_options_default="jumbo_build"
# Chromium's VAAPI stuff doesn't build on i686
if [ "${XBPS_TARGET_MACHINE}" != "i686" ]; then
makedepends+=" libva-devel"
fi
post_extract() {
case "${XBPS_TARGET_MACHINE}" in
*-musl)
@ -48,12 +43,13 @@ post_extract() {
patch -Np0 -i "$f"
done
;;
i686)
for f in "${FILESDIR}"/i686-patches/*.patch; do
echo "Applying $f"
patch -Np0 -i "$f"
done
esac
if [ "${XBPS_TARGET_MACHINE}" != "i686" ]; then
patch -Np0 -i "${FILESDIR}"/chromium-enable-vaapi.patch
fi
# Use the file at run time instead of effectively compiling it in
sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
-i device/usb/BUILD.gn
@ -162,12 +158,10 @@ do_configure() {
# Jumbo/Unity builds: https://chromium.googlesource.com/chromium/src/+/master/docs/jumbo.md
conf+=( "use_jumbo_build=$(vopt_if jumbo_build true false)" )
# Enable VAAPI. Doesn't compile on i686
if [ "${XBPS_TARGET_MACHINE}" != "i686" ]; then
conf+=(
'use_vaapi=true'
)
fi
# Enable VAAPI - hardware accelerated video decoding.
conf+=(
'use_vaapi=true'
)
# Use explicit library dependencies instead of dlopen.
# GN only has "link_pulseaudio", the other options used before are not available atm