chromium 72
This commit is contained in:
parent
2d03f67495
commit
4818465e5d
12
chromium-72.0.3626.121-fedora-user-agent.patch
Normal file
12
chromium-72.0.3626.121-fedora-user-agent.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up chromium-72.0.3626.121/content/common/user_agent.cc.fedora-user-agent chromium-72.0.3626.121/content/common/user_agent.cc
|
||||
--- chromium-72.0.3626.121/content/common/user_agent.cc.fedora-user-agent 2019-03-10 14:21:02.877454982 -0400
|
||||
+++ chromium-72.0.3626.121/content/common/user_agent.cc 2019-03-10 14:22:05.728812272 -0400
|
||||
@@ -36,7 +36,7 @@ std::string GetUserAgentPlatform() {
|
||||
#elif defined(OS_MACOSX)
|
||||
"Macintosh; ";
|
||||
#elif defined(USE_X11) || defined(USE_OZONE)
|
||||
- "X11; "; // strange, but that's what Firefox uses
|
||||
+ "X11; Fedora; "; // strange, but that's what Firefox uses
|
||||
#elif defined(OS_ANDROID)
|
||||
"Linux; ";
|
||||
#elif defined(OS_POSIX) || defined(OS_FUCHSIA)
|
29
chromium-72.0.3626.121-fix-va-check.patch
Normal file
29
chromium-72.0.3626.121-fix-va-check.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff -up chromium-72.0.3626.121/media/gpu/vaapi/vaapi_wrapper.cc.fixvacheck chromium-72.0.3626.121/media/gpu/vaapi/vaapi_wrapper.cc
|
||||
--- chromium-72.0.3626.121/media/gpu/vaapi/vaapi_wrapper.cc.fixvacheck 2019-03-10 14:54:38.744305074 -0400
|
||||
+++ chromium-72.0.3626.121/media/gpu/vaapi/vaapi_wrapper.cc 2019-03-10 14:55:34.383221574 -0400
|
||||
@@ -334,15 +334,16 @@ bool VADisplayState::InitializeOnce() {
|
||||
<< va_vendor_string_;
|
||||
|
||||
// The VAAPI version is determined from what is loaded on the system by
|
||||
- // calling vaInitialize(). We want a runtime evaluation of libva version,
|
||||
- // of what is loaded on the system, with, what browser is compiled with.
|
||||
- // Also since the libva is now ABI-compatible, relax the version check
|
||||
- // which helps in upgrading the libva, without breaking any existing
|
||||
- // functionality.
|
||||
- if (!VA_CHECK_VERSION(major_version, minor_version, 0)) {
|
||||
- LOG(ERROR) << "This build of Chromium requires VA-API version "
|
||||
- << VA_MAJOR_VERSION << "." << VA_MINOR_VERSION
|
||||
- << ", system version: " << major_version << "." << minor_version;
|
||||
+ // calling vaInitialize(). Since the libva is now ABI-compatible, relax the
|
||||
+ // version check which helps in upgrading the libva, without breaking any
|
||||
+ // existing functionality. Make sure the system version is not older than
|
||||
+ // the version with which the chromium is built since libva is only
|
||||
+ // guaranteed to be backward (and not forward) compatible.
|
||||
+ if (VA_MAJOR_VERSION > major_version ||
|
||||
+ (VA_MAJOR_VERSION == major_version && VA_MINOR_VERSION > minor_version)) {
|
||||
+ LOG(ERROR) << "The system version " << major_version << "." << minor_version
|
||||
+ << " should be greater than or equal to "
|
||||
+ << VA_MAJOR_VERSION << "." << VA_MINOR_VERSION;
|
||||
return false;
|
||||
}
|
||||
return true;
|
36
chromium-72.0.3626.121-gcc5-r3.patch
Normal file
36
chromium-72.0.3626.121-gcc5-r3.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff -up chromium-72.0.3626.121/gpu/ipc/common/mailbox_struct_traits.h.gcc5-r3 chromium-72.0.3626.121/gpu/ipc/common/mailbox_struct_traits.h
|
||||
--- chromium-72.0.3626.121/gpu/ipc/common/mailbox_struct_traits.h.gcc5-r3 2019-03-01 23:10:21.000000000 -0500
|
||||
+++ chromium-72.0.3626.121/gpu/ipc/common/mailbox_struct_traits.h 2019-03-10 14:07:48.300244125 -0400
|
||||
@@ -15,7 +15,7 @@ namespace mojo {
|
||||
template <>
|
||||
struct StructTraits<gpu::mojom::MailboxDataView, gpu::Mailbox> {
|
||||
static base::span<const int8_t> name(const gpu::Mailbox& mailbox) {
|
||||
- return mailbox.name;
|
||||
+ return base::make_span(mailbox.name);
|
||||
}
|
||||
static bool Read(gpu::mojom::MailboxDataView data, gpu::Mailbox* out);
|
||||
};
|
||||
diff -up chromium-72.0.3626.121/services/viz/public/cpp/compositing/quads_struct_traits.h.gcc5-r3 chromium-72.0.3626.121/services/viz/public/cpp/compositing/quads_struct_traits.h
|
||||
--- chromium-72.0.3626.121/services/viz/public/cpp/compositing/quads_struct_traits.h.gcc5-r3 2019-03-01 23:10:31.000000000 -0500
|
||||
+++ chromium-72.0.3626.121/services/viz/public/cpp/compositing/quads_struct_traits.h 2019-03-10 14:07:48.303244046 -0400
|
||||
@@ -340,7 +340,7 @@ struct StructTraits<viz::mojom::TextureQ
|
||||
static base::span<const float> vertex_opacity(const viz::DrawQuad& input) {
|
||||
const viz::TextureDrawQuad* quad =
|
||||
viz::TextureDrawQuad::MaterialCast(&input);
|
||||
- return quad->vertex_opacity;
|
||||
+ return base::make_span(quad->vertex_opacity);
|
||||
}
|
||||
|
||||
static bool y_flipped(const viz::DrawQuad& input) {
|
||||
diff -up chromium-72.0.3626.121/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc.gcc5-r3 chromium-72.0.3626.121/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc
|
||||
--- chromium-72.0.3626.121/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc.gcc5-r3 2019-03-10 14:07:48.307243941 -0400
|
||||
+++ chromium-72.0.3626.121/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc 2019-03-10 14:09:16.565920044 -0400
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "modules/audio_processing/aec3/aec_state.h"
|
||||
|
||||
-#include <math.h>
|
||||
+#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <vector>
|
79
chromium-72.0.3626.121-norar.patch
Normal file
79
chromium-72.0.3626.121-norar.patch
Normal file
@ -0,0 +1,79 @@
|
||||
diff -up chromium-72.0.3626.121/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-72.0.3626.121/chrome/common/safe_browsing/BUILD.gn
|
||||
--- chromium-72.0.3626.121/chrome/common/safe_browsing/BUILD.gn.nounrar 2019-03-10 14:15:47.187705953 -0400
|
||||
+++ chromium-72.0.3626.121/chrome/common/safe_browsing/BUILD.gn 2019-03-10 14:16:47.154138649 -0400
|
||||
@@ -56,40 +56,6 @@ if (safe_browsing_mode == 1) {
|
||||
]
|
||||
}
|
||||
|
||||
- source_set("rar_analyzer") {
|
||||
- sources = [
|
||||
- "rar_analyzer.cc",
|
||||
- "rar_analyzer.h",
|
||||
- ]
|
||||
-
|
||||
- deps = [
|
||||
- ":archive_analyzer_results",
|
||||
- ":download_type_util",
|
||||
- ":file_type_policies",
|
||||
- "//base",
|
||||
- "//base:i18n",
|
||||
- "//third_party/unrar:unrar",
|
||||
- ]
|
||||
-
|
||||
- defines = [
|
||||
- "_FILE_OFFSET_BITS=64",
|
||||
- "LARGEFILE_SOURCE",
|
||||
- "RAR_SMP",
|
||||
- "SILENT",
|
||||
-
|
||||
- # The following is set to disable certain macro definitions in the unrar
|
||||
- # source code.
|
||||
- "CHROMIUM_UNRAR",
|
||||
-
|
||||
- # Disables exceptions in unrar, replaces them with process termination.
|
||||
- "UNRAR_NO_EXCEPTIONS",
|
||||
- ]
|
||||
-
|
||||
- public_deps = [
|
||||
- "//components/safe_browsing:csd_proto",
|
||||
- ]
|
||||
- }
|
||||
-
|
||||
source_set("disk_image_type_sniffer_mac") {
|
||||
sources = [
|
||||
"disk_image_type_sniffer_mac.cc",
|
||||
@@ -150,7 +116,6 @@ source_set("safe_browsing") {
|
||||
deps += [
|
||||
":archive_analyzer_results",
|
||||
":download_type_util",
|
||||
- ":rar_analyzer",
|
||||
"//components/safe_browsing:features",
|
||||
]
|
||||
|
||||
diff -up chromium-72.0.3626.121/chrome/common/safe_browsing/DEPS.nounrar chromium-72.0.3626.121/chrome/common/safe_browsing/DEPS
|
||||
--- chromium-72.0.3626.121/chrome/common/safe_browsing/DEPS.nounrar 2019-03-01 23:10:03.000000000 -0500
|
||||
+++ chromium-72.0.3626.121/chrome/common/safe_browsing/DEPS 2019-03-10 14:14:55.430058716 -0400
|
||||
@@ -1,6 +1,5 @@
|
||||
include_rules = [
|
||||
"+components/safe_browsing",
|
||||
"+third_party/protobuf",
|
||||
- "+third_party/unrar",
|
||||
"+third_party/zlib",
|
||||
]
|
||||
diff -up chromium-72.0.3626.121/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-72.0.3626.121/chrome/services/file_util/safe_archive_analyzer.cc
|
||||
--- chromium-72.0.3626.121/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2019-03-01 23:10:04.000000000 -0500
|
||||
+++ chromium-72.0.3626.121/chrome/services/file_util/safe_archive_analyzer.cc 2019-03-10 14:14:55.433058638 -0400
|
||||
@@ -47,9 +47,13 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile
|
||||
|
||||
void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file,
|
||||
AnalyzeRarFileCallback callback) {
|
||||
+#if 0
|
||||
DCHECK(rar_file.IsValid());
|
||||
|
||||
safe_browsing::ArchiveAnalyzerResults results;
|
||||
safe_browsing::rar_analyzer::AnalyzeRarFile(std::move(rar_file), &results);
|
||||
std::move(callback).Run(results);
|
||||
+#else
|
||||
+ NOTREACHED();
|
||||
+#endif
|
||||
}
|
11
chromium-72.0.3626.121-notest.patch
Normal file
11
chromium-72.0.3626.121-notest.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -up chromium-72.0.3626.121/chrome/test/data/webui_test_resources.grd.notest chromium-72.0.3626.121/chrome/test/data/webui_test_resources.grd
|
||||
--- chromium-72.0.3626.121/chrome/test/data/webui_test_resources.grd.notest 2019-03-10 13:54:17.843583876 -0400
|
||||
+++ chromium-72.0.3626.121/chrome/test/data/webui_test_resources.grd 2019-03-10 14:03:29.302063637 -0400
|
||||
@@ -8,7 +8,6 @@
|
||||
</outputs>
|
||||
<release seq="1">
|
||||
<includes>
|
||||
- <include name="IDR_WEBUI_TEST_I18N_PROCESS_CSS_TEST" file="webui/i18n_process_css_test.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
|
||||
<include name="IDR_WEB_UI_TEST_MOJO_JS" file="${root_gen_dir}/chrome/test/data/webui/web_ui_test.mojom.js" use_base_dir="false" type="BINDATA"/>
|
||||
<include name="IDR_WEB_UI_TEST_MOJO_LITE_JS" file="${root_gen_dir}/chrome/test/data/webui/web_ui_test.mojom-lite.js" use_base_dir="false" type="BINDATA"/>
|
||||
</includes>
|
@ -2,6 +2,9 @@
|
||||
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
|
||||
%global _python_bytecompile_extra 1
|
||||
|
||||
# This is faster when it works, but it doesn't always.
|
||||
%global use_jumbo 0
|
||||
|
||||
# NEVER EVER EVER turn this on in official builds
|
||||
%global freeworld 0
|
||||
%if %{freeworld}
|
||||
@ -142,15 +145,15 @@ BuildRequires: libicu-devel >= 5.4
|
||||
%global chromoting_client_id %nil
|
||||
%endif
|
||||
|
||||
%global majorversion 71
|
||||
%global majorversion 72
|
||||
|
||||
%if %{freeworld}
|
||||
Name: chromium%{chromium_channel}%{?freeworld:-freeworld}
|
||||
%else
|
||||
Name: chromium%{chromium_channel}
|
||||
%endif
|
||||
Version: %{majorversion}.0.3578.98
|
||||
Release: 5%{?dist}
|
||||
Version: %{majorversion}.0.3626.121
|
||||
Release: 1%{?dist}
|
||||
Summary: A WebKit (Blink) powered web browser
|
||||
Url: http://www.chromium.org/Home
|
||||
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
|
||||
@ -159,7 +162,7 @@ License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and Open
|
||||
Patch0: chromium-67.0.3396.62-gcc5.patch
|
||||
Patch1: chromium-45.0.2454.101-linux-path-max.patch
|
||||
Patch2: chromium-55.0.2883.75-addrfix.patch
|
||||
Patch4: chromium-68.0.3440.106-notest.patch
|
||||
Patch4: chromium-72.0.3626.121-notest.patch
|
||||
# In file included from ../linux/directory.c:21:
|
||||
# In file included from ../../../../native_client/src/nonsfi/linux/abi_conversion.h:20:
|
||||
# ../../../../native_client/src/nonsfi/linux/linux_syscall_structs.h:44:13: error: GNU-style inline assembly is disabled
|
||||
@ -227,7 +230,7 @@ Patch53: chromium-61.0.3163.79-gcc-no-opt-safe-math.patch
|
||||
# Only needed when glibc 2.26.90 or later is used
|
||||
Patch57: chromium-63.0.3289.84-aarch64-glibc-2.26.90.patch
|
||||
# From gentoo
|
||||
Patch62: chromium-66.0.3359.117-gcc5-r3.patch
|
||||
Patch62: chromium-72.0.3626.121-gcc5-r3.patch
|
||||
# Do not try to use libc++ in the remoting stack
|
||||
# Patch63: chromium-63.0.3289.84-nolibc++.patch
|
||||
# To use round with gcc, you need to #include <cmath>
|
||||
@ -249,7 +252,7 @@ Patch88: chromium-66.0.3359.117-missing-files.patch
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=816952
|
||||
# Patch91: chromium-66.0.3359.117-gcc-vector-copy-constructor-fix.patch
|
||||
# Do not use unrar code, it is non-free
|
||||
Patch92: chromium-71.0.3578.98-norar.patch
|
||||
Patch92: chromium-72.0.3626.121-norar.patch
|
||||
# Upstream GCC fixes
|
||||
Patch93: chromium-66.0.3359.117-GCC-build-fix-base-Optional-T-requires-the-full-decl.patch
|
||||
Patch94: chromium-66.0.3359.117-GCC-fully-declare-ConfigurationPolicyProvider.patch
|
||||
@ -266,7 +269,7 @@ Patch98: chromium-69.0.3497.81-gcc8-alignof.patch
|
||||
# https://bugs.python.org/issue21591
|
||||
Patch100: chromium-67.0.3396.62-epel7-use-old-python-exec-syntax.patch
|
||||
# Add "Fedora" to the user agent string
|
||||
Patch101: chromium-68.0.3440.106-fedora-user-agent.patch
|
||||
Patch101: chromium-72.0.3626.121-fedora-user-agent.patch
|
||||
# Try to fix version.py for Rawhide
|
||||
Patch102: chromium-67.0.3396.99-py3fix.patch
|
||||
Patch103: chromium-71.0.3578.98-py2-bootstrap.patch
|
||||
@ -291,8 +294,6 @@ Patch117: chromium-70.0.3538.67-disable-fontconfig-cache-magic.patch
|
||||
Patch118: chromium-70.0.3538.77-harfbuzz2-fix.patch
|
||||
# Fix aarch64 build against latest linux kernel headers
|
||||
Patch119: chromium-70.0.3538.77-aarch64-arch-want-new-stat.patch
|
||||
# https://chromium.googlesource.com/chromium/src/tools/gn/+/6630c2e334d7bc179e95a3d543a8eca3201d6725
|
||||
Patch120: chromium-71.0.3578.98-remove-sysroot-options.patch
|
||||
# Enable VAAPI support on Linux
|
||||
# NOTE: This patch will never land upstream
|
||||
Patch121: enable-vaapi.patch
|
||||
@ -305,10 +306,10 @@ Patch122: chromium-70.0.3538.110-vaapi-i686-fpermissive.patch
|
||||
Patch123: relax-libva-version.patch
|
||||
# Fix compatibility with VA-API library (libva) version 1
|
||||
Patch124: chromium-71.0.3578.98-vaapi-libva1-compatibility.patch
|
||||
# From gentoo
|
||||
Patch125: https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-71-gcc-0.patch
|
||||
# drop rsp clobber, which breaks gcc9 (thanks to Jeff Law)
|
||||
Patch126: chromium-71.0.3578.98-gcc9-drop-rsp-clobber.patch
|
||||
# Fix va check code
|
||||
Patch127: chromium-72.0.3626.121-fix-va-check.patch
|
||||
|
||||
|
||||
# Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
|
||||
@ -856,15 +857,14 @@ udev.
|
||||
%patch118 -p1 -b .harfbuzz2
|
||||
%endif
|
||||
%patch119 -p1 -b .aarch64-new-stat
|
||||
%patch120 -p1 -b .sysrootfix
|
||||
%patch121 -p1 -b .vaapi
|
||||
%ifarch i686
|
||||
%patch122 -p1 -b .i686permissive
|
||||
%endif
|
||||
%patch123 -p1 -b .relaxva
|
||||
%patch124 -p1 -b .va1compat
|
||||
%patch125 -p1 -b .gcc-overloaded
|
||||
%patch126 -p1 -b .gcc9
|
||||
%patch127 -p1 -b .fixvacheck
|
||||
|
||||
# Change shebang in all relevant files in this directory and all subdirectories
|
||||
# See `man find` for how the `-exec command {} +` syntax works
|
||||
@ -1040,7 +1040,9 @@ CHROMIUM_CORE_GN_DEFINES+=' use_custom_libcxx=false'
|
||||
%ifarch aarch64
|
||||
CHROMIUM_CORE_GN_DEFINES+=' target_cpu="arm64"'
|
||||
%endif
|
||||
%if %{?use_jumbo}
|
||||
CHROMIUM_CORE_GN_DEFINES+=' use_jumbo_build=true jumbo_file_merge_limit=8'
|
||||
%endif
|
||||
export CHROMIUM_CORE_GN_DEFINES
|
||||
|
||||
CHROMIUM_BROWSER_GN_DEFINES=""
|
||||
@ -1094,13 +1096,12 @@ build/linux/unbundle/remove_bundled_libraries.py \
|
||||
'net/third_party/quic' \
|
||||
'net/third_party/spdy' \
|
||||
'net/third_party/uri_template' \
|
||||
'third_party/WebKit' \
|
||||
'third_party/abseil-cpp' \
|
||||
'third_party/adobe' \
|
||||
'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' \
|
||||
@ -1135,6 +1136,7 @@ build/linux/unbundle/remove_bundled_libraries.py \
|
||||
'third_party/catapult/tracing/third_party/pako' \
|
||||
'third_party/ced' \
|
||||
'third_party/cld_3' \
|
||||
'third_party/closure_compiler' \
|
||||
'third_party/crashpad' \
|
||||
'third_party/crashpad/crashpad/third_party/zlib/' \
|
||||
'third_party/crc32c' \
|
||||
@ -1149,7 +1151,6 @@ build/linux/unbundle/remove_bundled_libraries.py \
|
||||
'third_party/flot' \
|
||||
'third_party/fontconfig' \
|
||||
'third_party/freetype' \
|
||||
'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' \
|
||||
@ -1198,6 +1199,7 @@ build/linux/unbundle/remove_bundled_libraries.py \
|
||||
'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' \
|
||||
%if %{freeworld}
|
||||
@ -1241,7 +1243,6 @@ build/linux/unbundle/remove_bundled_libraries.py \
|
||||
'third_party/speech-dispatcher' \
|
||||
'third_party/spirv-headers' \
|
||||
'third_party/SPIRV-Tools' \
|
||||
'third_party/spirv-tools-angle' \
|
||||
'third_party/sqlite' \
|
||||
'third_party/swiftshader' \
|
||||
'third_party/swiftshader/third_party/subzero' \
|
||||
@ -1252,7 +1253,6 @@ build/linux/unbundle/remove_bundled_libraries.py \
|
||||
'third_party/usb_ids' \
|
||||
'third_party/usrsctp' \
|
||||
'third_party/vulkan' \
|
||||
'third_party/vulkan-validation-layers' \
|
||||
'third_party/web-animations-js' \
|
||||
'third_party/webdriver' \
|
||||
'third_party/webrtc' \
|
||||
@ -1821,6 +1821,9 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Mar 9 2019 Tom Callaway <spot@fedoraproject.org> - 72.0.3626.121-1
|
||||
- update to 72.0.3626.121
|
||||
|
||||
* Tue Feb 26 2019 Tom Callaway <spot@fedoraproject.org> - 71.0.3578.98-5
|
||||
- rebuild for libva api change
|
||||
|
||||
|
@ -1,26 +1,22 @@
|
||||
From efdd5bdf093e9074c9eba73650ff5ad95b280ec8 Mon Sep 17 00:00:00 2001
|
||||
From abc7295ca1653c85472916909f0eb76e28e79a58 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
|
||||
Date: Thu, 24 Jan 2019 12:45:29 +0530
|
||||
Subject: [PATCH] Enable mojo with VDA2 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(-)
|
||||
chrome/browser/about_flags.cc | 8 ++++----
|
||||
chrome/browser/flag_descriptions.cc | 9 +++++++--
|
||||
chrome/browser/flag_descriptions.h | 10 ++++++++--
|
||||
gpu/config/software_rendering_list.json | 3 ++-
|
||||
media/media_options.gni | 9 ++++++---
|
||||
media/mojo/services/gpu_mojo_media_client.cc | 4 ++--
|
||||
6 files changed, 29 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
index db54ccb61..f32075fb8 100644
|
||||
index 0a84c6ac1..be2aa1d8b 100644
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1797,7 +1797,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -1714,7 +1714,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
"disable-accelerated-video-decode",
|
||||
flag_descriptions::kAcceleratedVideoDecodeName,
|
||||
flag_descriptions::kAcceleratedVideoDecodeDescription,
|
||||
@ -29,7 +25,7 @@ index db54ccb61..f32075fb8 100644
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
|
||||
},
|
||||
#if defined(OS_WIN)
|
||||
@@ -2456,12 +2456,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -2345,12 +2345,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)},
|
||||
#endif // ENABLE_ISOLATED_XR_SERVICE
|
||||
#endif // ENABLE_VR
|
||||
@ -41,80 +37,42 @@ index db54ccb61..f32075fb8 100644
|
||||
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
|
||||
-#endif // OS_CHROMEOS
|
||||
+#endif // OS_CHROMEOS OS_LINUX
|
||||
+#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
|
||||
index 62637e092..86f89fc6e 100644
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -2996,9 +2996,9 @@ const char kTextSuggestionsTouchBarDescription[] =
|
||||
@@ -3085,15 +3085,20 @@ const char kTextSuggestionsTouchBarDescription[] =
|
||||
|
||||
#endif
|
||||
|
||||
-// Chrome OS -------------------------------------------------------------------
|
||||
+// Chrome OS and Linux -------------------------------------------------------------------
|
||||
+// Chrome OS 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[] =
|
||||
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
|
||||
+
|
||||
+#endif // defined(OS_CHROMEOS) defined(OS_LINUX) and !defined(OS_ANDROID)
|
||||
+
|
||||
+// Only Chrome OS ------------------------------------------------------
|
||||
+// 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
|
||||
index 5dac660bb..6cc4115da 100644
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -1824,13 +1824,22 @@ extern const char kPermissionPromptPersistenceToggleDescription[];
|
||||
@@ -1846,13 +1846,19 @@ extern const char kPermissionPromptPersistenceToggleDescription[];
|
||||
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
@ -122,171 +80,94 @@ index 944695782..38d8fe144 100644
|
||||
+// Chrome OS and Linux ------------------------------------------------------------------
|
||||
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
+#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 // defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+// Chrome OS ----------------------------------------------------------------------
|
||||
+// 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
|
||||
index 65f37b3f1..ae8a1718f 100644
|
||||
--- a/gpu/config/software_rendering_list.json
|
||||
+++ b/gpu/config/software_rendering_list.json
|
||||
@@ -369,17 +369,6 @@
|
||||
"all"
|
||||
]
|
||||
@@ -371,11 +371,12 @@
|
||||
},
|
||||
- {
|
||||
- "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
|
||||
"id": 48,
|
||||
- "description": "Accelerated video decode is unavailable on Linux",
|
||||
+ "description": "Accelerated VA-API video decode is not supported on NVIDIA platforms",
|
||||
"cr_bugs": [137247],
|
||||
"os": {
|
||||
"type": "linux"
|
||||
},
|
||||
+ "vendor_id": "0x10de",
|
||||
"features": [
|
||||
"accelerated_video_decode"
|
||||
]
|
||||
diff --git a/media/media_options.gni b/media/media_options.gni
|
||||
index 46eaa5818..6e338f651 100644
|
||||
--- a/media/media_options.gni
|
||||
+++ b/media/media_options.gni
|
||||
@@ -5,6 +5,7 @@
|
||||
import("//build/config/jumbo.gni")
|
||||
import("//media/media_options.gni")
|
||||
import("//third_party/libaom/options.gni")
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/chromecast_build.gni")
|
||||
import("//build/config/features.gni")
|
||||
+import("//media/gpu/args.gni")
|
||||
import("//testing/libfuzzer/fuzzer_test.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" ]
|
||||
}
|
||||
# Do not expand this list without double-checking with OWNERS, this is a list of
|
||||
@@ -129,8 +130,9 @@ declare_args() {
|
||||
# |mojo_media_services|). When enabled, selected mojo paths will be enabled in
|
||||
# the media pipeline and corresponding services will hosted in the selected
|
||||
# remote process (e.g. "utility" process, see |mojo_media_host|).
|
||||
- enable_mojo_media = is_android || is_chromecast || is_chromeos || is_mac ||
|
||||
- is_win || enable_library_cdms
|
||||
+ enable_mojo_media =
|
||||
+ is_android || is_chromecast || is_chromeos || is_mac || is_win ||
|
||||
+ enable_library_cdms || (is_desktop_linux && use_vaapi)
|
||||
|
||||
- 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_vaapi) {
|
||||
test("jpeg_encode_accelerator_unittest") {
|
||||
deps = [
|
||||
@@ -578,6 +584,7 @@ if (is_chromeos || is_linux) {
|
||||
if (use_ozone) {
|
||||
deps += [ "//ui/ozone" ]
|
||||
# Enable the TestMojoMediaClient to be used in mojo MediaService. This is for
|
||||
# testing only and will override the default platform MojoMediaClient, if any.
|
||||
@@ -200,7 +202,8 @@ if (enable_mojo_media) {
|
||||
]
|
||||
_default_mojo_media_host = "gpu"
|
||||
}
|
||||
+ public_configs = [ ":libva_config" ]
|
||||
- } else if (is_chromeos || is_mac || is_win) {
|
||||
+ } else if (is_chromeos || is_mac || is_win ||
|
||||
+ (is_desktop_linux && use_vaapi)) {
|
||||
_default_mojo_media_services = [ "video_decoder" ]
|
||||
_default_mojo_media_host = "gpu"
|
||||
}
|
||||
}
|
||||
diff --git a/media/mojo/services/gpu_mojo_media_client.cc b/media/mojo/services/gpu_mojo_media_client.cc
|
||||
index 75f5e611c..09a8fef92 100644
|
||||
--- a/media/mojo/services/gpu_mojo_media_client.cc
|
||||
+++ b/media/mojo/services/gpu_mojo_media_client.cc
|
||||
@@ -54,7 +54,7 @@ namespace media {
|
||||
namespace {
|
||||
|
||||
#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_MACOSX) || \
|
||||
- defined(OS_WIN)
|
||||
+ defined(OS_WIN) || defined(OS_LINUX)
|
||||
gpu::CommandBufferStub* GetCommandBufferStub(
|
||||
base::WeakPtr<MediaGpuChannelManager> media_gpu_channel_manager,
|
||||
base::UnguessableToken channel_token,
|
||||
@@ -148,7 +148,7 @@ std::unique_ptr<VideoDecoder> GpuMojoMediaClient::CreateVideoDecoder(
|
||||
android_overlay_factory_cb_, std::move(request_overlay_info_cb),
|
||||
std::make_unique<VideoFrameFactoryImpl>(gpu_task_runner_,
|
||||
std::move(get_stub_cb)));
|
||||
-#elif defined(OS_CHROMEOS) || defined(OS_MACOSX) || defined(OS_WIN)
|
||||
+#elif defined(OS_CHROMEOS) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
|
||||
std::unique_ptr<VideoDecoder> vda_video_decoder = VdaVideoDecoder::Create(
|
||||
task_runner, gpu_task_runner_, media_log->Clone(), target_color_space,
|
||||
gpu_preferences_, gpu_workarounds_,
|
||||
--
|
||||
2.19.2
|
||||
2.20.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user