summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO28
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD121
-rw-r--r--chromium-widevine-r3.patch22
-rw-r--r--enable-vaapi.patch292
5 files changed, 361 insertions, 104 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 20b32253336d..f949cb4a75f8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Fri Nov 9 15:49:15 UTC 2018
+# Thu Feb 14 14:39:40 UTC 2019
pkgbase = chromium-dev
pkgdesc = The open-source project behind Google Chrome (Dev Channel)
- pkgver = 72.0.3595.2
+ pkgver = 73.0.3683.20
pkgrel = 1
url = http://www.chromium.org
install = chromium-dev.install
@@ -27,9 +27,9 @@ pkgbase = chromium-dev
depends = minizip
depends = nss
depends = pciutils
- depends = re2
depends = snappy
depends = xdg-utils
+ depends = harfbuzz-icu
depends = gtk3
depends = openh264
depends = vulkan-icd-loader
@@ -45,30 +45,26 @@ pkgbase = chromium-dev
optdepends = libva-vdpau-driver-chromium: HW video acceleration for NVIDIA users
optdepends = libva-mesa-driver: HW video acceleration for Nouveau, R600 and RadeonSI users
optdepends = libva-intel-driver: HW video acceleration for Intel G45 and HD users
- source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-72.0.3595.2.tar.xz
+ source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-73.0.3683.20.tar.xz
source = git+https://github.com/foutrelis/chromium-launcher.git
source = chromium-dev.svg
source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-compiler-r7.patch
source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-webrtc-r0.patch
- source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-harfbuzz-r0.patch
+ source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-widevine-r4.patch
+ source = enable-vaapi.patch
source = chromium-ffmpeg-clang.patch
- source = chromium-intel-vaapi_r18.diff.base64::https://chromium-review.googlesource.com/changes/532294/revisions/18/patch?download
- source = chromium_fix_snapselectionstrategy_missing_include.base64::https://chromium-review.googlesource.com/changes/1304418/revisions/2/patch?download
- source = chromium-widevine-r3.patch
source = chromium-skia-harmony.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/chromium-skia-harmony.patch?h=packages/chromium
- source = fix_mixup_between_DIP_pixel_coordinates.diff.base64::https://chromium-review.googlesource.com/changes/1083692/revisions/3/patch?download
- sha256sums = 61a692d8841d838d9c348397b2f3770cc6dfb02f6d9d1466048148aa0d4e0cf9
+ source = chromium_use_sqrt.patch.base64::https://chromium-review.googlesource.com/changes/chromium%2Fsrc~1458193/revisions/2/patch?download
+ sha256sums = baf8b3ce13dd8d71c11f19cf257846739f0ea2bae3b6a02eaec7ce71088ddf3f
sha256sums = SKIP
sha256sums = dd2b5c4191e468972b5ea8ddb4fa2e2fa3c2c94c79fc06645d0efc0e63ce7ee1
sha256sums = 7fa727b29032577c70f5655b10a440599c12e53d6f52713e661defc1002cfa3a
sha256sums = bcb2f4588cf5dcf75cde855c7431e94fdcc34bdd68b876a90f65ab9938594562
- sha256sums = 1b370d49c43e88acfe7c0b1f9517047e927f3407bd80b4a48bba32c001f80136
+ sha256sums = 8c6ecc26aab9f4acc911350d9bb1e40f32cad144b6a08c9d7b188e9598d0f2de
+ sha256sums = SKIP
sha256sums = 16741344288d200fadf74546855e00aa204122e744b4811a36155efd5537bd95
- sha256sums = 957d777c67756074c8e028d08c1e88e738f881b3a8569e60c5bdd1da6737e305
- sha256sums = 486aa853cf7701aabc91c6b4c46adc50898eede3fc9c439b53515be6dd94758d
- sha256sums = 6e6576a11d0511fed7251160e3028fc2405983ff4cf60823e7e49db9e28a748b
- sha256sums = feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3
- sha256sums = d3330d7f7fa256e99488a6c9edce793c9fc1054e3766a66fde74ed2bd8ed496f
+ sha256sums = 5887f78b55c4ecbbcba5930f3f0bb7bc0117c2a41c2f761805fcf7f46f1ca2b3
+ sha256sums = 780d1b22ff2f6a20f3ce5e652a00dbdcc7e4140cf514b0fac10baf4e171ebd64
pkgname = chromium-dev
diff --git a/.gitignore b/.gitignore
index d3ae687ae8c9..56a2c6a15469 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,4 @@
!chromium-dev.install
!chromium-dev.svg
!chromium-ffmpeg-clang.patch
-!chromium-widevine-r3.patch
+!enable-vaapi.patch
diff --git a/PKGBUILD b/PKGBUILD
index 2ceadbd194b8..c05970b4c2e6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ _use_wayland=0 # Build Wayland NOTE: extremely experimental and don't
## -- Package and components information -- ##
##############################################
pkgname=chromium-dev
-pkgver=72.0.3595.2
+pkgver=73.0.3683.20
pkgrel=1
pkgdesc="The open-source project behind Google Chrome (Dev Channel)"
arch=('x86_64')
@@ -29,14 +29,14 @@ depends=(
'minizip'
'nss'
'pciutils'
- 're2'
+# 're2' # https://crbug.com/931373.
'snappy'
'xdg-utils'
-# 'harfbuzz-icu'
+ 'harfbuzz-icu'
# 'protobuf'
# 'libevent'
# 'ffmpeg'
-# 'icu' # https://crbug.com/678661
+# 'icu' # https://crbug.com/678661.
'gtk3'
'openh264'
'vulkan-icd-loader'
@@ -80,18 +80,16 @@ source=( #"https://gsdview.appspot.com/chromium-browser-official/chromium-${pkgv
"https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${pkgver}.tar.xz"
'git+https://github.com/foutrelis/chromium-launcher.git'
'chromium-dev.svg'
- # Patch form Gentoo
+ # Patch form Gentoo.
'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-compiler-r7.patch'
'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-webrtc-r0.patch'
- 'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-harfbuzz-r0.patch'
- # Misc Patches
+ 'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-widevine-r4.patch'
+ # Misc Patches.
+ 'enable-vaapi.patch' #::https://src.fedoraproject.org/cgit/rpms/chromium.git/tree/enable-vaapi.patch'
'chromium-ffmpeg-clang.patch'
- 'chromium-intel-vaapi_r18.diff.base64::https://chromium-review.googlesource.com/changes/532294/revisions/18/patch?download'
- # Patch from crbug (chromium bugtracker) or Arch chromium package
- 'chromium_fix_snapselectionstrategy_missing_include.base64::https://chromium-review.googlesource.com/changes/1304418/revisions/2/patch?download'
- 'chromium-widevine-r3.patch'
+ # Patch from crbug (chromium bugtracker) or Arch chromium package.
'chromium-skia-harmony.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/chromium-skia-harmony.patch?h=packages/chromium'
- 'fix_mixup_between_DIP_pixel_coordinates.diff.base64::https://chromium-review.googlesource.com/changes/1083692/revisions/3/patch?download'
+ 'chromium_use_sqrt.patch.base64::https://chromium-review.googlesource.com/changes/chromium%2Fsrc~1458193/revisions/2/patch?download'
)
sha256sums=( #"$(curl -sL https://gsdview.appspot.com/chromium-browser-official/chromium-${pkgver}.tar.xz.hashes | grep sha256 | cut -d ' ' -f3)"
"$(curl -sL https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${pkgver}.tar.xz.hashes | grep sha256 | cut -d ' ' -f3)"
@@ -100,15 +98,13 @@ sha256sums=( #"$(curl -sL https://gsdview.appspot.com/chromium-browser-official/
# Patch form Gentoo
'7fa727b29032577c70f5655b10a440599c12e53d6f52713e661defc1002cfa3a'
'bcb2f4588cf5dcf75cde855c7431e94fdcc34bdd68b876a90f65ab9938594562'
- '1b370d49c43e88acfe7c0b1f9517047e927f3407bd80b4a48bba32c001f80136'
+ '8c6ecc26aab9f4acc911350d9bb1e40f32cad144b6a08c9d7b188e9598d0f2de'
# Misc Patches
+ 'SKIP' #'a72a42f3f8ea5093c792df7d9662e8311a22f7bd0616cd8e2690990d5b247fc1'
'16741344288d200fadf74546855e00aa204122e744b4811a36155efd5537bd95'
- '957d777c67756074c8e028d08c1e88e738f881b3a8569e60c5bdd1da6737e305'
# Patch from crbug (chromium bugtracker) or Arch chromium package
- '486aa853cf7701aabc91c6b4c46adc50898eede3fc9c439b53515be6dd94758d'
- '6e6576a11d0511fed7251160e3028fc2405983ff4cf60823e7e49db9e28a748b'
- 'feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3'
- 'd3330d7f7fa256e99488a6c9edce793c9fc1054e3766a66fde74ed2bd8ed496f'
+ '5887f78b55c4ecbbcba5930f3f0bb7bc0117c2a41c2f761805fcf7f46f1ca2b3'
+ '780d1b22ff2f6a20f3ce5e652a00dbdcc7e4140cf514b0fac10baf4e171ebd64'
)
install=chromium-dev.install
@@ -141,18 +137,15 @@ _keeplibs=(
'courgette/third_party'
'native_client/src/third_party/dlmalloc'
'native_client_sdk/src/libraries/third_party/newlib-extras'
- 'net/third_party/http2'
'net/third_party/mozilla_security_manager'
'net/third_party/nss'
'net/third_party/quic'
- 'net/third_party/spdy'
'net/third_party/uri_template'
- 'third_party/WebKit'
'third_party/abseil-cpp'
- 'third_party/analytics'
'third_party/angle'
'third_party/angle/src/common/third_party/base'
'third_party/angle/src/common/third_party/smhasher'
+ 'third_party/angle/src/common/third_party/xxhash'
'third_party/angle/src/third_party/compiler'
'third_party/angle/src/third_party/libXNVCtrl'
'third_party/angle/src/third_party/trace_event'
@@ -195,7 +188,6 @@ _keeplibs=(
'third_party/flatbuffers'
'third_party/flot'
'third_party/glslang'
- 'third_party/glslang-angle'
'third_party/google_input_tools'
'third_party/google_input_tools/third_party/closure_library'
'third_party/google_input_tools/third_party/closure_library/third_party/closure'
@@ -233,6 +225,7 @@ _keeplibs=(
'third_party/mesa'
'third_party/metrics_proto'
'third_party/modp_b64'
+ 'third_party/nasm'
'third_party/node'
'third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2'
'third_party/openmax_dl'
@@ -260,6 +253,7 @@ _keeplibs=(
'third_party/sfntly'
'third_party/shaderc'
'third_party/skia'
+ 'third_party/skia/include/third_party/vulkan'
'third_party/skia/third_party/gif'
'third_party/skia/third_party/skcms'
'third_party/skia/third_party/spirv-headers'
@@ -269,7 +263,6 @@ _keeplibs=(
'third_party/smhasher'
'third_party/spirv-headers'
'third_party/SPIRV-Tools'
- 'third_party/spirv-tools-angle'
'third_party/sqlite'
'third_party/swiftshader'
'third_party/swiftshader/third_party/llvm-subzero'
@@ -277,7 +270,6 @@ _keeplibs=(
'third_party/tcmalloc'
'third_party/unrar'
'third_party/usrsctp'
- 'third_party/vulkan-validation-layers'
'third_party/vulkan'
'third_party/web-animations-js'
'third_party/webdriver'
@@ -293,12 +285,13 @@ _keeplibs=(
'third_party/woff2'
'third_party/zlib/google'
'url/third_party/mozilla'
+ 'v8/src/third_party/siphash'
'v8/src/third_party/valgrind'
'v8/src/third_party/utf8-decoder'
'v8/third_party/inspector_protocol'
'v8/third_party/v8'
- # gyp -> gn leftovers
+ # gyp -> gn leftovers.
'base/third_party/libevent'
'third_party/adobe'
'third_party/speech-dispatcher'
@@ -307,13 +300,18 @@ _keeplibs=(
'third_party/yasm/run_yasm.py'
)
+_keeplibs+=(
+ 'third_party/icu' # https://crbug.com/678661.
+ 'third_party/re2' # https://crbug.com/931373.
+ )
+
# Set build flags.
_flags=(
"custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
"host_toolchain=\"//build/toolchain/linux/unbundle:default\""
'is_debug=false'
'is_official_build=true'
-# 'enable_widevine=true'
+ 'enable_widevine=true'
'enable_hangout_services_extension=true'
"ffmpeg_branding=\"ChromeOS\""
'proprietary_codecs=true'
@@ -322,7 +320,7 @@ _flags=(
"google_default_client_secret=\"${_google_default_client_secret}\""
'fieldtrial_testing_like_official_build=true'
'remove_webcore_debug_symbols=true'
- 'use_gtk3=true'
+ 'use_aura=true'
'use_gio=false'
'use_gnome_keyring=false'
'link_pulseaudio=true'
@@ -330,13 +328,14 @@ _flags=(
'linux_use_bundled_binutils=false'
'treat_warnings_as_errors=false'
'enable_nacl=true'
- 'enable_nacl_nonsfi=false' # https://bugs.chromium.org/p/chromium/issues/detail?id=837441
- 'use_custom_libcxx=false'
- 'use_jumbo_build=false' # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md
+ 'enable_nacl_nonsfi=false' # https://crbug.com/837441.
+ 'use_custom_libcxx=true' # https://crbug.com/931373.
+ 'use_jumbo_build=false' # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md NOTE: gets OOM in my dual xeon (64Gb ram) machine :/
'enable_vulkan=true'
'use_vaapi=true'
'enable_hevc_demuxing=true'
'enable_ac3_eac3_audio_demuxing=true'
+ 'closure_compile=false'
)
if [ "${_wayland}" = "1" ]; then
@@ -349,36 +348,31 @@ if [ "${_wayland}" = "1" ]; then
fi
# Set the bundled/external components.
-# TODO: need ported to GN as GYP doing before. see status page: https://crbug.com/551343
+# TODO: need ported to GN as GYP doing before. see status page: https://crbug.com/551343.
_use_system=(
-# 'ffmpeg' # I'm not sure why, but all videos stop playbackl if use system ffmpeg
+# 'ffmpeg' # I'm not sure why, but all videos stop playback if use system ffmpeg.
'flac'
'fontconfig'
'freetype'
'harfbuzz-ng'
-# 'icu' # https://crbug.com/678661
+# 'icu' # https://crbug.com/678661
'libdrm'
-# 'libevent' # Get segfaults and other problems https://bugs.gentoo.org/593458
-# 'libjpeg' # needs bundled by blink
+# 'libevent' # Get segfaults and other problems https://bugs.gentoo.org/593458.
+# 'libjpeg' # needs bundled by blink.
'libpng'
-# 'libvpx' # Needs update
-# 'libwebp' # Needs update
+# 'libvpx' # Needs update.
+# 'libwebp' # Needs update.
'libxml'
'libxslt'
'openh264'
'opus'
- 're2'
+# 're2' # https://crbug.com/931373
'snappy'
'yasm'
'zlib'
)
-# https://crbug.com/678661
-_keeplibs+=(
- 'third_party/icu'
- )
-
-# Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
+# Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn).
CFLAGS+=' -Wno-builtin-macro-redefined'
CXXFLAGS+=' -Wno-builtin-macro-redefined'
CPPFLAGS+=' -D__DATE__= -D__TIME__= -D__TIMESTAMP__='
@@ -388,14 +382,14 @@ if check_option strip y; then
_flags+=(
'symbol_level=0'
)
- # Mimic exclude_unwind_tables=true
+ # Mimic exclude_unwind_tables=true.
CFLAGS+=' -fno-unwind-tables -fno-asynchronous-unwind-tables'
CXXFLAGS+=' -fno-unwind-tables -fno-asynchronous-unwind-tables'
CPPFLAGS+=' -DNO_UNWIND_TABLES'
fi
if check_buildoption ccache y; then
- # Avoid falling back to preprocessor mode when sources contain time macros
+ # Avoid falling back to preprocessor mode when sources contain time macros.
export CCACHE_CPP2=yes
export CCACHE_SLOPPINESS=time_macros
fi
@@ -444,18 +438,17 @@ prepare() {
# Patch sources from Gentoo.
patch -p1 -i "${srcdir}/chromium-compiler-r7.patch"
patch -p1 -i "${srcdir}/chromium-webrtc-r0.patch"
- patch -p1 -i "${srcdir}/chromium-harfbuzz-r0.patch"
- # Misc patches
+ # Misc patches.
# Pats to chromium dev's about why always they forget add/remove missing build rules.
- # not this time (?)
+ # not this time (?).
# Allow building against system libraries in official builds.
sed 's|OFFICIAL_BUILD|GOOGLE_CHROME_BUILD|' \
-i tools/generate_shim_headers/generate_shim_headers.py
- # Force script incompatible with Python 3 to use /usr/bin/python2
+ # Force script incompatible with Python 3 to use /usr/bin/python2.
sed -i '1s|python$|&2|' \
-i build/download_nacl_toolchains.py \
-i build/linux/unbundle/remove_bundled_libraries.py \
@@ -467,30 +460,29 @@ prepare() {
-i third_party/ffmpeg/chromium/scripts/generate_gn.py
export PNACLPYTHON=/usr/bin/python2
- # Setup vulkan
+ # Setup vulkan.
export VULKAN_SDK="/usr"
sed 's|/x86_64-linux-gnu||' -i gpu/vulkan/BUILD.gn
+ # Enable VAAPI.
+ patch -p1 -i "${srcdir}/enable-vaapi.patch"
- # https://chromium-review.googlesource.com/c/chromium/src/+/532294
- #base64 -d "${srcdir}/chromium-intel-vaapi_r18.diff.base64" | patch -p1 -i -
-
- # Patch from crbug (chromium bugtracker) or Arch chromium package
+ # Patch from crbug (chromium bugtracker) or Arch chromium package.
# https://crbug.com/819294
- base64 -d "${srcdir}/chromium_fix_snapselectionstrategy_missing_include.base64" | patch -p1 -i -
+ base64 -d "${srcdir}/chromium_use_sqrt.patch.base64" | patch -p1 -i -
# https://crbug.com/skia/6663#c10
- patch -p4 -i "${srcdir}/chromium-skia-harmony.patch"
+ patch -p0 -i "${srcdir}/chromium-skia-harmony.patch"
# https://crbug.com/473866
- patch -p1 -i "${srcdir}/chromium-widevine-r3.patch"
+ patch -p1 -i "${srcdir}/chromium-widevine-r4.patch"
# Setup nodejs dependency.
mkdir -p third_party/node/linux/node-linux-x64/bin/
ln -sf /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
- # Setup bundled ffmpe.g
+ # Setup bundled ffmpeg.
if [ "${_use_bundled_clang}" = "1" ]; then
# Setup the ffmpeg correct compiler if use bundled clang.
cat "${srcdir}/chromium-ffmpeg-clang.patch" | sed "s|__CLANG_PATH__|${_clang_path}|g" | patch -p1 -i -
@@ -539,9 +531,9 @@ build() {
LC_ALL=C gn gen out/Release -v --args="${_flags[*]}" --script-executable=/usr/bin/python2
# Build all.
- # Work around broken deps
+ # Work around broken deps.
LC_ALL=C ninja -C out/Release gen/ui/accessibility/ax_enums.mojom{,-shared}.h
- LC_ALL=C ninja -C out/Release -v chrome chrome_sandbox chromedriver #widevinecdmadapter
+ LC_ALL=C ninja -C out/Release -v chrome chrome_sandbox chromedriver
}
package() {
@@ -571,7 +563,6 @@ package() {
'libVkLayer_parameter_validation.so'
'libVkLayer_threading.so'
'libVkLayer_unique_objects.so'
-# 'libwidevinecdmadapter.so'
'swiftshader/libEGL.so'
'swiftshader/libGLESv2.so'
)
@@ -583,7 +574,7 @@ package() {
'natives_blob.bin'
'snapshot_blob.bin'
'v8_context_snapshot.bin'
- 'icudtl.dat'
+ 'icudtl.dat' # https://crbug.com/678661
#
'MEIPreload/manifest.json'
'MEIPreload/preloaded_data.pb'
@@ -596,7 +587,7 @@ package() {
_nacl_libs=(
'nacl_helper'
'nacl_helper_bootstrap'
-# 'nacl_helper_nonsfi'
+# 'nacl_helper_nonsfi' # https://crbug.com/837441
'nacl_irt_x86_64.nexe'
)
for i in "${_nacl_libs[@]}"; do
diff --git a/chromium-widevine-r3.patch b/chromium-widevine-r3.patch
deleted file mode 100644
index 3c411ada2a37..000000000000
--- a/chromium-widevine-r3.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 5818fdbef3d399fe1bfbb56f81e59184e1a8e467 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppymaster@gmail.com>
-Date: Sun, 14 Oct 2018 20:04:03 -0400
-Subject: [PATCH] Define WIDEVINE_CDM_VERSION_STRING
-
----
- third_party/widevine/cdm/widevine_cdm_version.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/third_party/widevine/cdm/widevine_cdm_version.h b/third_party/widevine/cdm/widevine_cdm_version.h
-index dd6efed02646..eaa017197e61 100644
---- a/third_party/widevine/cdm/widevine_cdm_version.h
-+++ b/third_party/widevine/cdm/widevine_cdm_version.h
-@@ -11,5 +11,6 @@
- // If the Widevine CDM is available define the following:
- // - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
- // as a string, e.g., "1.0.123.456").
-+#define WIDEVINE_CDM_VERSION_STRING "unknown"
-
- #endif // WIDEVINE_CDM_VERSION_H_
---
-2.19.1 \ No newline at end of file
diff --git a/enable-vaapi.patch b/enable-vaapi.patch
new file mode 100644
index 000000000000..6de79103cd58
--- /dev/null
+++ b/enable-vaapi.patch
@@ -0,0 +1,292 @@
+From efdd5bdf093e9074c9eba73650ff5ad95b280ec8 Mon Sep 17 00:00:00 2001
+From: Akarshan Biswas <akarshan.biswas@gmail.com>
+Date: Sun, 4 Nov 2018 20:26:54 +0530
+Subject: [PATCH] Enable vaapi on Linux
+
+---
+ chrome/browser/about_flags.cc | 14 +++++++------
+ chrome/browser/flag_descriptions.cc | 22 +++++++++++++-------
+ chrome/browser/flag_descriptions.h | 16 +++++++++-----
+ components/viz/service/main/viz_main_impl.cc | 2 +-
+ content/gpu/BUILD.gn | 6 ++++++
+ content/gpu/gpu_main.cc | 4 ++--
+ gpu/config/software_rendering_list.json | 11 ----------
+ media/base/media_switches.cc | 2 +-
+ media/filters/BUILD.gn | 3 ++-
+ media/gpu/BUILD.gn | 7 +++++++
+ 10 files changed, 52 insertions(+), 35 deletions(-)
+
+diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
+index db54ccb61..f32075fb8 100644
+--- a/chrome/browser/about_flags.cc
++++ b/chrome/browser/about_flags.cc
+@@ -1797,7 +1797,7 @@ const FeatureEntry kFeatureEntries[] = {
+ "disable-accelerated-video-decode",
+ flag_descriptions::kAcceleratedVideoDecodeName,
+ flag_descriptions::kAcceleratedVideoDecodeDescription,
+- kOsMac | kOsWin | kOsCrOS | kOsAndroid,
++ kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
+ },
+ #if defined(OS_WIN)
+@@ -2456,12 +2456,12 @@ const FeatureEntry kFeatureEntries[] = {
+ FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)},
+ #endif // ENABLE_ISOLATED_XR_SERVICE
+ #endif // ENABLE_VR
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ {"disable-accelerated-mjpeg-decode",
+ flag_descriptions::kAcceleratedMjpegDecodeName,
+- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
++ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
+-#endif // OS_CHROMEOS
++#endif // OS_CHROMEOS OS_LINUX
+ {"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
+ flag_descriptions::kV8CacheOptionsDescription, kOsAll,
+ MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
+@@ -4371,12 +4371,14 @@ const FeatureEntry kFeatureEntries[] = {
+ "AutofillDropdownLayout")},
+ #endif // OS_ANDROID
+
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ {"enable-vaapi-jpeg-image-decode-acceleration",
+ flag_descriptions::kVaapiJpegImageDecodeAccelerationName,
+- flag_descriptions::kVaapiJpegImageDecodeAccelerationDescription, kOsCrOS,
++ flag_descriptions::kVaapiJpegImageDecodeAccelerationDescription, kOsCrOS | kOsLinux,
+ FEATURE_VALUE_TYPE(features::kVaapiJpegImageDecodeAcceleration)},
++#endif
+
++#if defined(OS_CHROMEOS)
+ {"enable-home-launcher-gestures",
+ flag_descriptions::kEnableHomeLauncherGesturesName,
+ flag_descriptions::kEnableHomeLauncherGesturesDescription, kOsCrOS,
+diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
+index 6cc51bbfb..3c4babe3d 100644
+--- a/chrome/browser/flag_descriptions.cc
++++ b/chrome/browser/flag_descriptions.cc
+@@ -2996,9 +2996,9 @@ const char kTextSuggestionsTouchBarDescription[] =
+
+ #endif
+
+-// Chrome OS -------------------------------------------------------------------
++// Chrome OS and Linux -------------------------------------------------------------------
+
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
+
+ const char kAcceleratedMjpegDecodeName[] =
+ "Hardware-accelerated mjpeg decode for captured frame";
+@@ -3006,6 +3006,18 @@ const char kAcceleratedMjpegDecodeDescription[] =
+ "Enable hardware-accelerated mjpeg decode for captured frame where "
+ "available.";
+
++const char kVaapiJpegImageDecodeAccelerationName[] =
++ "VA-API JPEG decode acceleration for images";
++const char kVaapiJpegImageDecodeAccelerationDescription[] =
++ "Enable or disable decode acceleration of JPEG images (as opposed to camera"
++ " captures) using the VA-API.";
++
++#endif // defined(OS_CHROMEOS) defined(OS_LINUX) and !defined(OS_ANDROID)
++
++// Only Chrome OS ------------------------------------------------------
++
++#if defined(OS_CHROMEOS)
++
+ const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click";
+ const char kAllowTouchpadThreeFingerClickDescription[] =
+ "Enables touchpad three-finger-click as middle button.";
+@@ -3524,12 +3536,6 @@ const char kUseMonitorColorSpaceDescription[] =
+ "Enables Chrome to use the color space information provided by the monitor"
+ " instead of the default sRGB color space.";
+
+-const char kVaapiJpegImageDecodeAccelerationName[] =
+- "VA-API JPEG decode acceleration for images";
+-const char kVaapiJpegImageDecodeAccelerationDescription[] =
+- "Enable or disable decode acceleration of JPEG images (as opposed to camera"
+- " captures) using the VA-API.";
+-
+ const char kVideoPlayerChromecastSupportName[] =
+ "Experimental Chromecast support for Video Player";
+ const char kVideoPlayerChromecastSupportDescription[] =
+diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
+index 944695782..38d8fe144 100644
+--- a/chrome/browser/flag_descriptions.h
++++ b/chrome/browser/flag_descriptions.h
+@@ -1824,13 +1824,22 @@ extern const char kPermissionPromptPersistenceToggleDescription[];
+
+ #endif // defined(OS_MACOSX)
+
+-// Chrome OS ------------------------------------------------------------------
++// Chrome OS and Linux ------------------------------------------------------------------
+
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
+
+ extern const char kAcceleratedMjpegDecodeName[];
+ extern const char kAcceleratedMjpegDecodeDescription[];
+
++extern const char kVaapiJpegImageDecodeAccelerationName[];
++extern const char kVaapiJpegImageDecodeAccelerationDescription[];
++
++#endif
++
++// Chrome OS ----------------------------------------------------------------------
++
++#if defined(OS_CHROMEOS)
++
+ extern const char kAllowTouchpadThreeFingerClickName[];
+ extern const char kAllowTouchpadThreeFingerClickDescription[];
+
+@@ -2145,9 +2154,6 @@ extern const char kUseMashDescription[];
+ extern const char kUseMonitorColorSpaceName[];
+ extern const char kUseMonitorColorSpaceDescription[];
+
+-extern const char kVaapiJpegImageDecodeAccelerationName[];
+-extern const char kVaapiJpegImageDecodeAccelerationDescription[];
+-
+ extern const char kVideoPlayerChromecastSupportName[];
+ extern const char kVideoPlayerChromecastSupportDescription[];
+
+diff --git a/components/viz/service/main/viz_main_impl.cc b/components/viz/service/main/viz_main_impl.cc
+index 6f5f55de7..b90db3738 100644
+--- a/components/viz/service/main/viz_main_impl.cc
++++ b/components/viz/service/main/viz_main_impl.cc
+@@ -41,7 +41,7 @@ std::unique_ptr<base::Thread> CreateAndStartIOThread() {
+ // It should be possible to use |main_task_runner_| for doing IO tasks.
+ base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
+ thread_options.priority = base::ThreadPriority::NORMAL;
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
+ // TODO(reveman): Remove this in favor of setting it explicitly for each
+ // type of process.
+ thread_options.priority = base::ThreadPriority::DISPLAY;
+diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
+index 8974e441d..d7eba85a9 100644
+--- a/content/gpu/BUILD.gn
++++ b/content/gpu/BUILD.gn
+@@ -6,6 +6,7 @@ import("//build/config/jumbo.gni")
+ import("//build/config/ui.gni")
+ import("//gpu/vulkan/features.gni")
+ import("//media/media_options.gni")
++import("//media/gpu/args.gni")
+ import("//ui/ozone/ozone.gni")
+
+ # See //content/BUILD.gn for how this works.
+@@ -134,4 +135,9 @@ target(link_target_type, "gpu_sources") {
+ (!is_chromecast || is_cast_desktop_build)) {
+ configs += [ "//build/config/linux/dri" ]
+ }
++
++ # Use vaapi on desktop Linux builds when use_vaapi is set
++ if (is_desktop_linux && use_vaapi) {
++ public_configs = [ "//media/gpu:libva_config" ]
++ }
+ }
+diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
+index 8397889b6..188d960a4 100644
+--- a/content/gpu/gpu_main.cc
++++ b/content/gpu/gpu_main.cc
+@@ -284,7 +284,7 @@ int GpuMain(const MainFunctionParams& parameters) {
+
+ base::PlatformThread::SetName("CrGpuMain");
+
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
+ // Set thread priority before sandbox initialization.
+ base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
+ #endif
+@@ -317,7 +317,7 @@ int GpuMain(const MainFunctionParams& parameters) {
+ GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
+
+ base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
+ io_thread_priority = base::ThreadPriority::DISPLAY;
+ #endif
+
+diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
+index cb6118b6a..7b8ea0f75 100644
+--- a/gpu/config/software_rendering_list.json
++++ b/gpu/config/software_rendering_list.json
+@@ -369,17 +369,6 @@
+ "all"
+ ]
+ },
+- {
+- "id": 48,
+- "description": "Accelerated video decode is unavailable on Linux",
+- "cr_bugs": [137247],
+- "os": {
+- "type": "linux"
+- },
+- "features": [
+- "accelerated_video_decode"
+- ]
+- },
+ {
+ "id": 50,
+ "description": "Disable VMware software renderer on older Mesa",
+diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
+index 41bfa9172..30ca4f40a 100644
+--- a/media/base/media_switches.cc
++++ b/media/base/media_switches.cc
+@@ -495,7 +495,7 @@ bool IsVideoCaptureAcceleratedJpegDecodingEnabled() {
+ switches::kUseFakeJpegDecodeAccelerator)) {
+ return true;
+ }
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ return true;
+ #endif
+ return false;
+diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn
+index d558b537a..9ad090e07 100644
+--- a/media/filters/BUILD.gn
++++ b/media/filters/BUILD.gn
+@@ -5,6 +5,7 @@
+ import("//build/config/jumbo.gni")
+ import("//media/media_options.gni")
+ import("//third_party/libaom/options.gni")
++import("//media/gpu/args.gni")
+
+ jumbo_source_set("filters") {
+ # Do not expand the visibility here without double-checking with OWNERS, this
+@@ -200,7 +201,7 @@ jumbo_source_set("filters") {
+ deps += [ "//media/base/android" ]
+ }
+
+- if (current_cpu != "arm" && is_linux) {
++ if (use_vaapi && is_linux) {
+ sources += [
+ "h264_bitstream_buffer.cc",
+ "h264_bitstream_buffer.h",
+diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn
+index 07bfdefda..7e33cd747 100644
+--- a/media/gpu/BUILD.gn
++++ b/media/gpu/BUILD.gn
+@@ -508,6 +508,12 @@ if (use_v4l2_codec || use_vaapi || is_mac || is_win) {
+ }
+ }
+
++import("//build/config/linux/pkg_config.gni")
++
++pkg_config("libva_config") {
++ packages = [ "libva" ]
++}
++
+ if (use_v4l2_codec || use_vaapi) {
+ test("jpeg_encode_accelerator_unittest") {
+ deps = [
+@@ -578,6 +584,7 @@ if (is_chromeos || is_linux) {
+ if (use_ozone) {
+ deps += [ "//ui/ozone" ]
+ }
++ public_configs = [ ":libva_config" ]
+ }
+ }
+
+--
+2.19.2
+