mirror of
https://abf.rosa.ru/djam/chromium-browser-stable-test.git
synced 2025-02-23 17:42:45 +00:00
Updated to 66.0.3359.181.
This commit is contained in:
parent
43eaef40f0
commit
0efa8b8b1e
11 changed files with 114 additions and 376 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,5 +1,5 @@
|
||||||
sources:
|
sources:
|
||||||
chromium-65.0.3325.181.tar.xz: 20218999db4b9bc483654f695324830d0c887f7e
|
chromium-66.0.3359.181.tar.xz: 5c3f055f227666ecadbc5d0e3ba999b4ffb318d1
|
||||||
depot_tools.tar.xz: 082b7f9a4dfa7eb03900755b4866aef2d73543a5
|
depot_tools.tar.xz: 082b7f9a4dfa7eb03900755b4866aef2d73543a5
|
||||||
icons.tar.bz2: a835954af164bf38f8ea4ea80608839bed7800a3
|
icons.tar.bz2: a835954af164bf38f8ea4ea80608839bed7800a3
|
||||||
new-system-icons.tar.xz: 89339b8b3b05359a8745ed7968fe148902a2fa28
|
new-system-icons.tar.xz: 89339b8b3b05359a8745ed7968fe148902a2fa28
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
--- chromium-60.0.3112.40/build/linux/unbundle/ffmpeg.gn.ffmpeg-deprecation 2017-06-25 13:24:47.390218631 +0200
|
|
||||||
+++ chromium-60.0.3112.40/build/linux/unbundle/ffmpeg.gn 2017-06-25 13:32:48.528583949 +0200
|
|
||||||
@@ -19,6 +19,12 @@
|
|
||||||
flags = [ "USE_SYSTEM_FFMPEG=true" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
+config("ffmpeg_deprecations") {
|
|
||||||
+ if (is_linux) {
|
|
||||||
+ cflags = [ "-Wno-error=deprecated-declarations" ]
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
shim_headers("ffmpeg_shim") {
|
|
||||||
root_path = "."
|
|
||||||
headers = [
|
|
||||||
@@ -33,5 +39,5 @@
|
|
||||||
":ffmpeg_features",
|
|
||||||
":ffmpeg_shim",
|
|
||||||
]
|
|
||||||
- public_configs = [ ":system_ffmpeg" ]
|
|
||||||
+ public_configs = [ ":system_ffmpeg", ":ffmpeg_deprecations" ]
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
diff -urN chromium-54.0.2840.100/base/BUILD.gn chromium-54.0.2840.100-patched/base/BUILD.gn
|
|
||||||
--- chromium-54.0.2840.100/base/BUILD.gn 2016-11-11 06:02:09.000000000 +1000
|
|
||||||
+++ chromium-54.0.2840.100-patched/base/BUILD.gn 2016-11-16 15:18:19.361838354 +1000
|
|
||||||
@@ -45,13 +45,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
config("base_flags") {
|
|
||||||
- if (is_clang) {
|
|
||||||
- cflags = [
|
|
||||||
- # Don't die on dtoa code that uses a char as an array index.
|
|
||||||
- # This is required solely for base/third_party/dmg_fp/dtoa_wrapper.cc.
|
|
||||||
- "-Wno-char-subscripts",
|
|
||||||
- ]
|
|
||||||
- }
|
|
||||||
+ cflags = [ "-Wno-error=deprecated-declarations" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
config("base_implementation") {
|
|
|
@ -1,10 +0,0 @@
|
||||||
diff -up chromium-59.0.3071.86/build/config/clang/clang.gni.system-clang chromium-59.0.3071.86/build/config/clang/clang.gni
|
|
||||||
--- chromium-59.0.3071.86/build/config/clang/clang.gni.system-clang 2017-06-11 20:57:07.327949687 -0400
|
|
||||||
+++ chromium-59.0.3071.86/build/config/clang/clang.gni 2017-06-11 20:57:24.085620826 -0400
|
|
||||||
@@ -9,5 +9,5 @@ declare_args() {
|
|
||||||
# coding guidelines, etc. Only used when compiling with Clang.
|
|
||||||
clang_use_chrome_plugins = is_clang && !is_nacl && !use_xcode_clang
|
|
||||||
|
|
||||||
- clang_base_path = "//third_party/llvm-build/Release+Asserts"
|
|
||||||
+ clang_base_path = "/usr"
|
|
||||||
}
|
|
12
chromium-66.0.3359.81-system-clang.patch
Normal file
12
chromium-66.0.3359.81-system-clang.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff -urN chromium-66.0.3359.81.orig/build/config/clang/clang.gni chromium-66.0.3359.81/build/config/clang/clang.gni
|
||||||
|
--- chromium-66.0.3359.81.orig/build/config/clang/clang.gni 2018-04-11 18:07:36.127271285 +0300
|
||||||
|
+++ chromium-66.0.3359.81/build/config/clang/clang.gni 2018-04-11 18:07:47.817410409 +0300
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
|
||||||
|
import("//build/toolchain/toolchain.gni")
|
||||||
|
|
||||||
|
-default_clang_base_path = "//third_party/llvm-build/Release+Asserts"
|
||||||
|
+default_clang_base_path = "/usr"
|
||||||
|
|
||||||
|
declare_args() {
|
||||||
|
# Indicates if the build should use the Chrome-specific plugins for enforcing
|
|
@ -23,6 +23,7 @@
|
||||||
%define icu 0
|
%define icu 0
|
||||||
%define libva 1
|
%define libva 1
|
||||||
%define clang 1
|
%define clang 1
|
||||||
|
%define jsoncpp 0
|
||||||
|
|
||||||
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
|
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
|
||||||
# Note: these are for Mageia use ONLY.
|
# Note: these are for Mageia use ONLY.
|
||||||
|
@ -33,7 +34,7 @@
|
||||||
|
|
||||||
Summary: A fast web browser based on the Blink engine
|
Summary: A fast web browser based on the Blink engine
|
||||||
Name: chromium-browser-stable
|
Name: chromium-browser-stable
|
||||||
Version: 65.0.3325.181
|
Version: 66.0.3359.181
|
||||||
Release: 1
|
Release: 1
|
||||||
License: BSD, LGPL
|
License: BSD, LGPL
|
||||||
Group: Networking/WWW
|
Group: Networking/WWW
|
||||||
|
@ -51,14 +52,11 @@ Source32: chromium.default
|
||||||
Source100: icons.tar.bz2
|
Source100: icons.tar.bz2
|
||||||
Source997: depot_tools.tar.xz
|
Source997: depot_tools.tar.xz
|
||||||
Source999: new-system-icons.tar.xz
|
Source999: new-system-icons.tar.xz
|
||||||
Patch0: chromium-54-no-deprecated-error.patch
|
|
||||||
Patch4: chromium-30.0.1599.66-master-prefs-path.patch
|
Patch4: chromium-30.0.1599.66-master-prefs-path.patch
|
||||||
|
|
||||||
Patch22: chromium-54-proprietary-codecs-assert.patch
|
Patch22: chromium-54-proprietary-codecs-assert.patch
|
||||||
# (cjw) disable werror for a compilation warning that causes the build to fail
|
# (cjw) disable werror for a compilation warning that causes the build to fail
|
||||||
Patch23: chromium-53-bignum-werror-fix.patch
|
Patch23: chromium-53-bignum-werror-fix.patch
|
||||||
# (cjw) add -Wno-error=depecated-declarations because ffmpeg deprecations cause the build to fail
|
|
||||||
Patch24: chromium-53-ffmpeg-no-deprecation-errors.patch
|
|
||||||
# (cjw) add missing unbundle gn files (1)
|
# (cjw) add missing unbundle gn files (1)
|
||||||
Patch28: chromium-53-gn-system-icu-jsoncpp.patch
|
Patch28: chromium-53-gn-system-icu-jsoncpp.patch
|
||||||
# (cjw) build pdfium with system libtiff and libpng
|
# (cjw) build pdfium with system libtiff and libpng
|
||||||
|
@ -84,8 +82,7 @@ Patch502: chromium-45.0.2454.101-system-icu-54-does-not-have-detectHostTimeZone.
|
||||||
# fix build with icu other than 54
|
# fix build with icu other than 54
|
||||||
Patch504: chromium-system-icu-r0.patch
|
Patch504: chromium-system-icu-r0.patch
|
||||||
# https://aur.archlinux.org/packages/chromium-vaapi/
|
# https://aur.archlinux.org/packages/chromium-vaapi/
|
||||||
Patch507: chromium-vaapi-init-r16.patch
|
Patch508: chromium-vaapi-r18.patch
|
||||||
Patch508: chromium-vaapi-r16.patch
|
|
||||||
Patch509: chromium-widevine.patch
|
Patch509: chromium-widevine.patch
|
||||||
|
|
||||||
# ROSA Build
|
# ROSA Build
|
||||||
|
@ -95,8 +92,11 @@ Patch601: chromium-62-include-cstdlib.patch
|
||||||
|
|
||||||
# From gentoo
|
# From gentoo
|
||||||
Patch602: chromium-gcc5-r4.patch
|
Patch602: chromium-gcc5-r4.patch
|
||||||
|
# https://github.com/RussianFedora/chromium/blob/fedora-stable/chromium-66.0.3359.81-system-clang.patch
|
||||||
Patch603: chromium-59.0.3071.86-system-clang.patch
|
Patch603: chromium-66.0.3359.81-system-clang.patch
|
||||||
|
Patch604: chromium-clang-r2.patch
|
||||||
|
# http://ftp.riken.jp/Linux/gentoo/www-client/chromium/files/
|
||||||
|
Patch605: chromium-ffmpeg-r1.patch
|
||||||
|
|
||||||
Provides: %{crname} = %{EVRD}
|
Provides: %{crname} = %{EVRD}
|
||||||
Conflicts: chromium-browser-unstable
|
Conflicts: chromium-browser-unstable
|
||||||
|
@ -123,7 +123,9 @@ BuildRequires: cap-devel
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
BuildRequires: elfutils-devel
|
BuildRequires: elfutils-devel
|
||||||
BuildRequires: jpeg-devel
|
BuildRequires: jpeg-devel
|
||||||
|
%if 0%{jsoncpp}
|
||||||
BuildRequires: jsoncpp-devel
|
BuildRequires: jsoncpp-devel
|
||||||
|
%endif
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
BuildRequires: snappy-devel
|
BuildRequires: snappy-devel
|
||||||
BuildRequires: speech-dispatcher-devel
|
BuildRequires: speech-dispatcher-devel
|
||||||
|
@ -212,7 +214,6 @@ your profile before changing channels.
|
||||||
%{_crdir}/locales
|
%{_crdir}/locales
|
||||||
%{_crdir}/*.pak
|
%{_crdir}/*.pak
|
||||||
%{_crdir}/resources
|
%{_crdir}/resources
|
||||||
%{_crdir}/*_blob.bin
|
|
||||||
%{_crdir}/themes
|
%{_crdir}/themes
|
||||||
%{_crdir}/default_apps
|
%{_crdir}/default_apps
|
||||||
%{_crdir}/swiftshader
|
%{_crdir}/swiftshader
|
||||||
|
@ -269,12 +270,9 @@ members of the Chromium and WebDriver teams.
|
||||||
%prep
|
%prep
|
||||||
%setup -qn chromium-%{version} -a 997 -a 999
|
%setup -qn chromium-%{version} -a 997 -a 999
|
||||||
|
|
||||||
%patch0 -p1
|
|
||||||
%patch4 -p1 -b .prefs
|
%patch4 -p1 -b .prefs
|
||||||
|
|
||||||
%patch22 -p1
|
%patch22 -p1
|
||||||
%patch23 -p1
|
%patch23 -p1
|
||||||
%patch24 -p1
|
|
||||||
%patch28 -p1
|
%patch28 -p1
|
||||||
%patch30 -p1
|
%patch30 -p1
|
||||||
%patch32 -p1
|
%patch32 -p1
|
||||||
|
@ -294,8 +292,7 @@ members of the Chromium and WebDriver teams.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?libva}
|
%if 0%{?libva}
|
||||||
%patch507 -p1
|
%patch508 -p1 -b .vaapi
|
||||||
%patch508 -p1 -b .vaapi2
|
|
||||||
%endif
|
%endif
|
||||||
%patch509 -p1
|
%patch509 -p1
|
||||||
|
|
||||||
|
@ -304,10 +301,13 @@ members of the Chromium and WebDriver teams.
|
||||||
%patch602 -p1
|
%patch602 -p1
|
||||||
|
|
||||||
%patch603 -p1
|
%patch603 -p1
|
||||||
|
%patch604 -p1
|
||||||
|
%patch605 -p1
|
||||||
|
|
||||||
mkdir -p third_party/llvm-build/Release+Asserts/bin
|
mkdir -p third_party/llvm-build/Release+Asserts/bin
|
||||||
pushd third_party/llvm-build/Release+Asserts/bin
|
pushd third_party/llvm-build/Release+Asserts/bin
|
||||||
ln -s /usr/bin/clang clang
|
ln -sf /usr/bin/clang clang
|
||||||
|
ln -sf /usr/bin/clang++ clang++
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# files we do not want from upstream source bundles
|
# files we do not want from upstream source bundles
|
||||||
|
@ -394,7 +394,7 @@ mkdir -p third_party/node/linux/node-linux-x64/bin
|
||||||
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
|
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%define system_gn_list ffmpeg flac libxslt snappy yasm libpng zlib jsoncpp
|
%define system_gn_list ffmpeg flac libxslt snappy yasm libpng zlib
|
||||||
# opus
|
# opus
|
||||||
# icu
|
# icu
|
||||||
# libevent
|
# libevent
|
||||||
|
@ -403,6 +403,7 @@ ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
|
||||||
# System libxml must be built with icu support to be used in Chromium
|
# System libxml must be built with icu support to be used in Chromium
|
||||||
# libxml
|
# libxml
|
||||||
# handled by upstream regular build scripts? : freetype harfbuzz-ng
|
# handled by upstream regular build scripts? : freetype harfbuzz-ng
|
||||||
|
# jsoncpp
|
||||||
|
|
||||||
%if %{mdvver} >= 201610
|
%if %{mdvver} >= 201610
|
||||||
%define use_gold false
|
%define use_gold false
|
||||||
|
@ -417,8 +418,7 @@ ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# v NO TABS IN HERE!
|
# v NO TABS IN HERE!
|
||||||
%define gn_config use_gconf=false \
|
%define gn_config use_sysroot=false \
|
||||||
use_sysroot=false \
|
|
||||||
system_libdir="%{_lib}" \
|
system_libdir="%{_lib}" \
|
||||||
icu_use_data_file=true \
|
icu_use_data_file=true \
|
||||||
enable_nacl=false \
|
enable_nacl=false \
|
||||||
|
@ -447,11 +447,13 @@ ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
|
||||||
is_debug=false \
|
is_debug=false \
|
||||||
is_clang=%{is_clang} \
|
is_clang=%{is_clang} \
|
||||||
clang_use_chrome_plugins=false \
|
clang_use_chrome_plugins=false \
|
||||||
|
clang_base_path="/usr" \
|
||||||
is_lld=true \
|
is_lld=true \
|
||||||
use_vaapi=true \
|
use_vaapi=true \
|
||||||
use_system_freetype=true \
|
use_system_freetype=true \
|
||||||
use_system_harfbuzz=true \
|
use_system_harfbuzz=true \
|
||||||
use_system_libpng=true \
|
use_system_libpng=true \
|
||||||
|
v8_use_external_startup_data=false \
|
||||||
google_api_key="%{google_api_key}" \
|
google_api_key="%{google_api_key}" \
|
||||||
google_default_client_id="%{google_default_client_id}" \
|
google_default_client_id="%{google_default_client_id}" \
|
||||||
google_default_client_secret="%{google_default_client_secret}"
|
google_default_client_secret="%{google_default_client_secret}"
|
||||||
|
@ -461,7 +463,7 @@ third_party/libaddressinput/chromium/tools/update-strings.py
|
||||||
|
|
||||||
%if 0%{?clang}
|
%if 0%{?clang}
|
||||||
export CC=clang
|
export CC=clang
|
||||||
export CXX="clang++ -stdlib=libc++"
|
export CXX=clang++
|
||||||
export AR=ar
|
export AR=ar
|
||||||
export NM=nm
|
export NM=nm
|
||||||
%else
|
%else
|
||||||
|
@ -499,7 +501,7 @@ install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox
|
||||||
cp -a out/Release/chromedriver %{buildroot}%{_crdir}/chromedriver
|
cp -a out/Release/chromedriver %{buildroot}%{_crdir}/chromedriver
|
||||||
install -m 644 out/Release/*.pak %{buildroot}%{_crdir}/
|
install -m 644 out/Release/*.pak %{buildroot}%{_crdir}/
|
||||||
install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/
|
install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/
|
||||||
cp -a out/Release/*_blob.bin %{buildroot}%{_crdir}/
|
#cp -a out/Release/*.bin %{buildroot}%{_crdir}/
|
||||||
|
|
||||||
install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/
|
install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/
|
||||||
install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/
|
install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/
|
||||||
|
|
21
chromium-clang-r2.patch
Normal file
21
chromium-clang-r2.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
--- a/build/config/compiler/BUILD.gn
|
||||||
|
+++ b/build/config/compiler/BUILD.gn
|
||||||
|
@@ -422,18 +422,6 @@
|
||||||
|
cflags += [ "-fcolor-diagnostics" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
- # TODO(hans): Remove this once Clang generates better optimized debug info by
|
||||||
|
- # default. https://crbug.com/765793
|
||||||
|
- if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
|
||||||
|
- target_os != "chromeos") {
|
||||||
|
- cflags += [
|
||||||
|
- "-Xclang",
|
||||||
|
- "-mllvm",
|
||||||
|
- "-Xclang",
|
||||||
|
- "-instcombine-lower-dbg-declare=0",
|
||||||
|
- ]
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
# Print absolute paths in diagnostics. There is no precedent for doing this
|
||||||
|
# on Linux/Mac (GCC doesn't support it), but MSVC does this with /FC and
|
||||||
|
# Windows developers rely on it (crbug.com/636109) so only do this on Windows.
|
22
chromium-ffmpeg-r1.patch
Normal file
22
chromium-ffmpeg-r1.patch
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
--- a/build/linux/unbundle/ffmpeg.gn
|
||||||
|
+++ b/build/linux/unbundle/ffmpeg.gn
|
||||||
|
@@ -14,8 +14,8 @@ pkg_config("system_ffmpeg") {
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
-buildflag_header("ffmpeg_buildflags") {
|
||||||
|
- header = "ffmpeg_buildflags.h"
|
||||||
|
+buildflag_header("ffmpeg_features") {
|
||||||
|
+ header = "ffmpeg_features.h"
|
||||||
|
flags = [ "USE_SYSTEM_FFMPEG=true" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ shim_headers("ffmpeg_shim") {
|
||||||
|
|
||||||
|
source_set("ffmpeg") {
|
||||||
|
deps = [
|
||||||
|
- ":ffmpeg_buildflags",
|
||||||
|
+ ":ffmpeg_features",
|
||||||
|
":ffmpeg_shim",
|
||||||
|
]
|
||||||
|
public_configs = [ ":system_ffmpeg" ]
|
|
@ -9,17 +9,6 @@
|
||||||
}
|
}
|
||||||
static bool Read(gpu::mojom::MailboxDataView data, gpu::Mailbox* out);
|
static bool Read(gpu::mojom::MailboxDataView data, gpu::Mailbox* out);
|
||||||
};
|
};
|
||||||
--- a/services/viz/public/cpp/compositing/filter_operation_struct_traits.h
|
|
||||||
+++ b/services/viz/public/cpp/compositing/filter_operation_struct_traits.h
|
|
||||||
@@ -134,7 +134,7 @@ struct StructTraits<viz::mojom::FilterOperationDataView, cc::FilterOperation> {
|
|
||||||
static base::span<const float> matrix(const cc::FilterOperation& operation) {
|
|
||||||
if (operation.type() != cc::FilterOperation::COLOR_MATRIX)
|
|
||||||
return base::span<const float>();
|
|
||||||
- return operation.matrix();
|
|
||||||
+ return base::make_span(operation.matrix());
|
|
||||||
}
|
|
||||||
|
|
||||||
static base::span<const gfx::Rect> shape(
|
|
||||||
--- a/services/viz/public/cpp/compositing/quads_struct_traits.h
|
--- a/services/viz/public/cpp/compositing/quads_struct_traits.h
|
||||||
+++ b/services/viz/public/cpp/compositing/quads_struct_traits.h
|
+++ b/services/viz/public/cpp/compositing/quads_struct_traits.h
|
||||||
@@ -303,7 +303,7 @@ struct StructTraits<viz::mojom::TextureQuadStateDataView, viz::DrawQuad> {
|
@@ -303,7 +303,7 @@ struct StructTraits<viz::mojom::TextureQuadStateDataView, viz::DrawQuad> {
|
||||||
|
|
|
@ -1,253 +0,0 @@
|
||||||
From 281edc278272f0650fc190c8539d443ac59157bc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Charles <daniel.charles@intel.com>
|
|
||||||
Date: Thu, 08 Feb 2018 02:36:51 +0000
|
|
||||||
Subject: [PATCH] vaapi initialization: move it to vaapi_wrapper
|
|
||||||
|
|
||||||
vaapi loading of libraries happens on the Pre and Post Sandbox
|
|
||||||
functions. Moving dynamic loading of libaries, i.e. libva,libva-drm
|
|
||||||
and i965_drv_video shared libraries to vaapi_wrapper.
|
|
||||||
|
|
||||||
When calling PreSandbox function in vaapi_wrapper libva will open
|
|
||||||
i965_drv_video shared library and both will be available for use
|
|
||||||
|
|
||||||
BUG=785117
|
|
||||||
TEST=video initialization of h/w dec/enc, VAVDA/VAVEA/VAJDA subjective
|
|
||||||
testing and include unittests and autotests
|
|
||||||
|
|
||||||
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
|
|
||||||
Change-Id: I862bb49f1167d7437e80387882cb9081ad53f54b
|
|
||||||
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/666138
|
|
||||||
Commit-Queue: Miguel Casas <mcasas@chromium.org>
|
|
||||||
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
||||||
Reviewed-by: Antoine Labour <piman@chromium.org>
|
|
||||||
Reviewed-by: Dongseong Hwang <dongseong.hwang@intel.com>
|
|
||||||
Reviewed-by: Pawel Osciak <posciak@chromium.org>
|
|
||||||
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/master@{#535274}
|
|
||||||
---
|
|
||||||
|
|
||||||
diff --git a/content/gpu/gpu_sandbox_hook_linux.cc b/content/gpu/gpu_sandbox_hook_linux.cc
|
|
||||||
index e69e23e..5c4013c 100644
|
|
||||||
--- a/content/gpu/gpu_sandbox_hook_linux.cc
|
|
||||||
+++ b/content/gpu/gpu_sandbox_hook_linux.cc
|
|
||||||
@@ -29,10 +29,6 @@
|
|
||||||
#include "services/service_manager/sandbox/linux/bpf_gpu_policy_linux.h"
|
|
||||||
#include "services/service_manager/sandbox/linux/sandbox_linux.h"
|
|
||||||
|
|
||||||
-#if BUILDFLAG(USE_VAAPI)
|
|
||||||
-#include <va/va_version.h>
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
using sandbox::bpf_dsl::Policy;
|
|
||||||
using sandbox::syscall_broker::BrokerFilePermission;
|
|
||||||
using sandbox::syscall_broker::BrokerProcess;
|
|
||||||
@@ -48,22 +44,6 @@
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
-inline bool IsArchitectureX86_64() {
|
|
||||||
-#if defined(__x86_64__)
|
|
||||||
- return true;
|
|
||||||
-#else
|
|
||||||
- return false;
|
|
||||||
-#endif
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-inline bool IsArchitectureI386() {
|
|
||||||
-#if defined(__i386__)
|
|
||||||
- return true;
|
|
||||||
-#else
|
|
||||||
- return false;
|
|
||||||
-#endif
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
inline bool IsArchitectureArm() {
|
|
||||||
#if defined(ARCH_CPU_ARM_FAMILY)
|
|
||||||
return true;
|
|
||||||
@@ -88,14 +68,6 @@
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
-inline bool IsLibVAVersion2() {
|
|
||||||
-#if BUILDFLAG(USE_VAAPI) && VA_MAJOR_VERSION == 1
|
|
||||||
- return true;
|
|
||||||
-#else
|
|
||||||
- return false;
|
|
||||||
-#endif
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE;
|
|
||||||
|
|
||||||
void AddV4L2GpuWhitelist(
|
|
||||||
@@ -270,50 +242,6 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-void LoadStandardLibraries(
|
|
||||||
- const service_manager::SandboxSeccompBPF::Options& options) {
|
|
||||||
- if (IsArchitectureX86_64() || IsArchitectureI386()) {
|
|
||||||
- // Accelerated video dlopen()'s some shared objects
|
|
||||||
- // inside the sandbox, so preload them now.
|
|
||||||
- if (IsAcceleratedVideoEnabled(options)) {
|
|
||||||
- if (IsLibVAVersion2()) {
|
|
||||||
- if (IsArchitectureX86_64()) {
|
|
||||||
- dlopen("/usr/lib64/va/drivers/i965_drv_video.so", dlopen_flag);
|
|
||||||
- dlopen("/usr/lib64/va/drivers/hybrid_drv_video.so", dlopen_flag);
|
|
||||||
- } else if (IsArchitectureI386()) {
|
|
||||||
- dlopen("/usr/lib/va/drivers/i965_drv_video.so", dlopen_flag);
|
|
||||||
- }
|
|
||||||
- dlopen("libva.so.2", dlopen_flag);
|
|
||||||
-#if defined(USE_OZONE)
|
|
||||||
- dlopen("libva-drm.so.2", dlopen_flag);
|
|
||||||
-#endif
|
|
||||||
- } else {
|
|
||||||
- // If we are linked against libva 1, we have two cases to handle:
|
|
||||||
- // - the sysroot includes both libva 1 and 2, in which case the drivers
|
|
||||||
- // are in /usr/lib{64}/va1/
|
|
||||||
- // - the sysroot only includes libva 1, in which case the drivers are
|
|
||||||
- // are in /usr/lib{64}/va/
|
|
||||||
- // This is ugly, but temporary until all builds have switched to libva 2.
|
|
||||||
- if (IsArchitectureX86_64()) {
|
|
||||||
- if (!dlopen("/usr/lib64/va1/drivers/i965_drv_video.so", dlopen_flag))
|
|
||||||
- dlopen("/usr/lib64/va/drivers/i965_drv_video.so", dlopen_flag);
|
|
||||||
- if (!dlopen("/usr/lib64/va1/drivers/hybrid_drv_video.so", dlopen_flag))
|
|
||||||
- dlopen("/usr/lib64/va/drivers/hybrid_drv_video.so", dlopen_flag);
|
|
||||||
- } else if (IsArchitectureI386()) {
|
|
||||||
- if (!dlopen("/usr/lib/va1/drivers/i965_drv_video.so", dlopen_flag))
|
|
||||||
- dlopen("/usr/lib/va/drivers/i965_drv_video.so", dlopen_flag);
|
|
||||||
- }
|
|
||||||
- dlopen("libva.so.1", dlopen_flag);
|
|
||||||
-#if defined(USE_OZONE)
|
|
||||||
- dlopen("libva-drm.so.1", dlopen_flag);
|
|
||||||
-#elif defined(USE_X11)
|
|
||||||
- dlopen("libva-x11.so.1", dlopen_flag);
|
|
||||||
-#endif
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
bool LoadLibrariesForGpu(
|
|
||||||
const service_manager::SandboxSeccompBPF::Options& options) {
|
|
||||||
if (IsChromeOS()) {
|
|
||||||
@@ -326,7 +254,6 @@
|
|
||||||
if (options.use_amd_specific_policies)
|
|
||||||
return LoadAmdGpuLibraries();
|
|
||||||
}
|
|
||||||
- LoadStandardLibraries(options);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc
|
|
||||||
index bc3d735..7421a74 100644
|
|
||||||
--- a/media/gpu/vaapi/vaapi_wrapper.cc
|
|
||||||
+++ b/media/gpu/vaapi/vaapi_wrapper.cc
|
|
||||||
@@ -48,6 +48,11 @@
|
|
||||||
using media_gpu_vaapi::kModuleVa_x11;
|
|
||||||
#endif
|
|
||||||
using media_gpu_vaapi::InitializeStubs;
|
|
||||||
+using media_gpu_vaapi::IsVaInitialized;
|
|
||||||
+#if defined(USE_X11)
|
|
||||||
+using media_gpu_vaapi::IsVa_x11Initialized;
|
|
||||||
+#endif
|
|
||||||
+using media_gpu_vaapi::IsVa_drmInitialized;
|
|
||||||
using media_gpu_vaapi::StubPathMap;
|
|
||||||
|
|
||||||
#define LOG_VA_ERROR_AND_REPORT(va_error, err_msg) \
|
|
||||||
@@ -166,9 +171,6 @@
|
|
||||||
void SetDrmFd(base::PlatformFile fd) { drm_fd_.reset(HANDLE_EINTR(dup(fd))); }
|
|
||||||
|
|
||||||
private:
|
|
||||||
- // Returns false on init failure.
|
|
||||||
- static bool PostSandboxInitialization();
|
|
||||||
-
|
|
||||||
// Protected by |va_lock_|.
|
|
||||||
int refcount_;
|
|
||||||
|
|
||||||
@@ -203,41 +205,17 @@
|
|
||||||
VADisplayState::Get()->SetDrmFd(drm_file.GetPlatformFile());
|
|
||||||
}
|
|
||||||
|
|
||||||
-// static
|
|
||||||
-bool VADisplayState::PostSandboxInitialization() {
|
|
||||||
- const std::string va_suffix(std::to_string(VA_MAJOR_VERSION + 1));
|
|
||||||
- StubPathMap paths;
|
|
||||||
-
|
|
||||||
- paths[kModuleVa].push_back(std::string("libva.so.") + va_suffix);
|
|
||||||
- paths[kModuleVa_drm].push_back(std::string("libva-drm.so.") + va_suffix);
|
|
||||||
-#if defined(USE_X11)
|
|
||||||
- // libva-x11 does not exist on libva >= 2
|
|
||||||
- if (VA_MAJOR_VERSION == 0)
|
|
||||||
- paths[kModuleVa_x11].push_back("libva-x11.so.1");
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
- const bool success = InitializeStubs(paths);
|
|
||||||
- if (!success) {
|
|
||||||
- static const char kErrorMsg[] = "Failed to initialize VAAPI libs";
|
|
||||||
-#if defined(OS_CHROMEOS)
|
|
||||||
- // When Chrome runs on Linux with target_os="chromeos", do not log error
|
|
||||||
- // message without VAAPI libraries.
|
|
||||||
- LOG_IF(ERROR, base::SysInfo::IsRunningOnChromeOS()) << kErrorMsg;
|
|
||||||
-#else
|
|
||||||
- DVLOG(1) << kErrorMsg;
|
|
||||||
-#endif
|
|
||||||
- }
|
|
||||||
- return success;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
VADisplayState::VADisplayState()
|
|
||||||
: refcount_(0), va_display_(nullptr), va_initialized_(false) {}
|
|
||||||
|
|
||||||
bool VADisplayState::Initialize() {
|
|
||||||
va_lock_.AssertAcquired();
|
|
||||||
|
|
||||||
- static bool result = PostSandboxInitialization();
|
|
||||||
- if (!result)
|
|
||||||
+ if (!IsVaInitialized() ||
|
|
||||||
+#if defined(USE_X11)
|
|
||||||
+ !IsVa_x11Initialized() ||
|
|
||||||
+#endif
|
|
||||||
+ !IsVa_drmInitialized())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (refcount_++ > 0)
|
|
||||||
@@ -1169,6 +1147,38 @@
|
|
||||||
// static
|
|
||||||
void VaapiWrapper::PreSandboxInitialization() {
|
|
||||||
VADisplayState::PreSandboxInitialization();
|
|
||||||
+
|
|
||||||
+ const std::string va_suffix(std::to_string(VA_MAJOR_VERSION + 1));
|
|
||||||
+ StubPathMap paths;
|
|
||||||
+
|
|
||||||
+ paths[kModuleVa].push_back(std::string("libva.so.") + va_suffix);
|
|
||||||
+ paths[kModuleVa_drm].push_back(std::string("libva-drm.so.") + va_suffix);
|
|
||||||
+#if defined(USE_X11)
|
|
||||||
+ paths[kModuleVa_x11].push_back(std::string("libva-x11.so.") + va_suffix);
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+ // InitializeStubs dlopen() VA-API libraries
|
|
||||||
+ // libva.so
|
|
||||||
+ // libva-x11.so (X11)
|
|
||||||
+ // libva-drm.so (X11 and Ozone).
|
|
||||||
+ static bool result = InitializeStubs(paths);
|
|
||||||
+ if (!result) {
|
|
||||||
+ static const char kErrorMsg[] = "Failed to initialize VAAPI libs";
|
|
||||||
+#if defined(OS_CHROMEOS)
|
|
||||||
+ // When Chrome runs on Linux with target_os="chromeos", do not log error
|
|
||||||
+ // message without VAAPI libraries.
|
|
||||||
+ LOG_IF(ERROR, base::SysInfo::IsRunningOnChromeOS()) << kErrorMsg;
|
|
||||||
+#else
|
|
||||||
+ DVLOG(1) << kErrorMsg;
|
|
||||||
+#endif
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // VASupportedProfiles::Get creates VADisplayState and in so doing
|
|
||||||
+ // driver associated libraries are dlopen(), to know:
|
|
||||||
+ // i965_drv_video.so
|
|
||||||
+ // hybrid_drv_video.so (platforms that support it)
|
|
||||||
+ // libcmrt.so (platforms that support it)
|
|
||||||
+ VASupportedProfiles::Get();
|
|
||||||
}
|
|
||||||
|
|
||||||
VaapiWrapper::VaapiWrapper()
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 4bf343ab8c4a538205f9c1e96a661e40620c716b Mon Sep 17 00:00:00 2001
|
From e95d904578c265a84f117d7d5eff598423f9283d Mon Sep 17 00:00:00 2001
|
||||||
From: Daniel Charles <daniel.charles@intel.com>
|
From: Daniel Charles <daniel.charles@intel.com>
|
||||||
Date: Fri, 09 Feb 2018 14:39:27 -0800
|
Date: Fri, 09 Feb 2018 14:39:27 -0800
|
||||||
Subject: [PATCH] Enable VAVDA, VAVEA and VAJDA on linux with VAAPI only
|
Subject: [PATCH] Enable VAVDA, VAVEA and VAJDA on linux with VAAPI only
|
||||||
|
@ -29,14 +29,14 @@ TEST=subjective testing with VAVDA,VAVEA and VAJDA, autotest for encoder
|
||||||
have libva/intel-vaapi-driver installed and not installed in the system
|
have libva/intel-vaapi-driver installed and not installed in the system
|
||||||
repeat on different hardware families
|
repeat on different hardware families
|
||||||
|
|
||||||
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
|
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
|
||||||
Change-Id: Ifbbf5c9e5221a8b5733fc6d4d0cf984a1f103171
|
Change-Id: Ifbbf5c9e5221a8b5733fc6d4d0cf984a1f103171
|
||||||
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
---
|
---
|
||||||
|
|
||||||
--- a/chrome/browser/about_flags.cc
|
--- a/chrome/browser/about_flags.cc
|
||||||
+++ b/chrome/browser/about_flags.cc
|
+++ b/chrome/browser/about_flags.cc
|
||||||
@@ -1249,12 +1249,14 @@ const FeatureEntry kFeatureEntries[] = {
|
@@ -1234,12 +1234,14 @@ const FeatureEntry kFeatureEntries[] = {
|
||||||
flag_descriptions::kUiPartialSwapDescription, kOsAll,
|
flag_descriptions::kUiPartialSwapDescription, kOsAll,
|
||||||
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
|
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
|
||||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||||
|
@ -51,7 +51,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
{"enable-webrtc-hw-h264-encoding",
|
{"enable-webrtc-hw-h264-encoding",
|
||||||
flag_descriptions::kWebrtcHwH264EncodingName,
|
flag_descriptions::kWebrtcHwH264EncodingName,
|
||||||
flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
|
flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
|
||||||
@@ -1550,6 +1552,13 @@ const FeatureEntry kFeatureEntries[] = {
|
@@ -1553,6 +1555,13 @@ const FeatureEntry kFeatureEntries[] = {
|
||||||
flag_descriptions::kShowTouchHudDescription, kOsCrOS,
|
flag_descriptions::kShowTouchHudDescription, kOsCrOS,
|
||||||
SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)},
|
SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)},
|
||||||
#endif // OS_CHROMEOS
|
#endif // OS_CHROMEOS
|
||||||
|
@ -65,7 +65,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
{
|
{
|
||||||
"disable-accelerated-video-decode",
|
"disable-accelerated-video-decode",
|
||||||
flag_descriptions::kAcceleratedVideoDecodeName,
|
flag_descriptions::kAcceleratedVideoDecodeName,
|
||||||
@@ -1557,6 +1566,7 @@ const FeatureEntry kFeatureEntries[] = {
|
@@ -1560,6 +1569,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||||
kOsMac | kOsWin | kOsCrOS | kOsAndroid,
|
kOsMac | kOsWin | kOsCrOS | kOsAndroid,
|
||||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
|
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
|
||||||
},
|
},
|
||||||
|
@ -73,7 +73,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
{"enable-hdr", flag_descriptions::kEnableHDRName,
|
{"enable-hdr", flag_descriptions::kEnableHDRName,
|
||||||
flag_descriptions::kEnableHDRDescription, kOsWin,
|
flag_descriptions::kEnableHDRDescription, kOsWin,
|
||||||
@@ -2268,12 +2278,17 @@ const FeatureEntry kFeatureEntries[] = {
|
@@ -2283,12 +2293,17 @@ const FeatureEntry kFeatureEntries[] = {
|
||||||
FEATURE_VALUE_TYPE(features::kOpenVR)},
|
FEATURE_VALUE_TYPE(features::kOpenVR)},
|
||||||
#endif // ENABLE_OPENVR
|
#endif // ENABLE_OPENVR
|
||||||
#endif // ENABLE_VR
|
#endif // ENABLE_VR
|
||||||
|
@ -118,7 +118,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
::switches::kDisableBlinkFeatures,
|
::switches::kDisableBlinkFeatures,
|
||||||
::switches::kDisableCastStreamingHWEncoding,
|
::switches::kDisableCastStreamingHWEncoding,
|
||||||
::switches::kDisableDistanceFieldText,
|
::switches::kDisableDistanceFieldText,
|
||||||
@@ -164,7 +170,7 @@ void DeriveCommandLine(const GURL& start
|
@@ -163,7 +169,7 @@ void DeriveCommandLine(const GURL& start
|
||||||
::switches::kDisableWebGLImageChromium,
|
::switches::kDisableWebGLImageChromium,
|
||||||
::switches::kEnableWebGLImageChromium,
|
::switches::kEnableWebGLImageChromium,
|
||||||
::switches::kEnableWebVR,
|
::switches::kEnableWebVR,
|
||||||
|
@ -143,7 +143,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
|
const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
|
||||||
const char kAcceleratedVideoDecodeDescription[] =
|
const char kAcceleratedVideoDecodeDescription[] =
|
||||||
"Hardware-accelerated video decode where available.";
|
"Hardware-accelerated video decode where available.";
|
||||||
@@ -1597,6 +1604,7 @@ const char kWebrtcEchoCanceller3Name[] =
|
@@ -1730,6 +1737,7 @@ const char kWebrtcEchoCanceller3Name[] =
|
||||||
const char kWebrtcEchoCanceller3Description[] =
|
const char kWebrtcEchoCanceller3Description[] =
|
||||||
"Experimental WebRTC echo canceller (AEC3).";
|
"Experimental WebRTC echo canceller (AEC3).";
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
|
const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
|
||||||
const char kWebrtcHwDecodingDescription[] =
|
const char kWebrtcHwDecodingDescription[] =
|
||||||
"Support in WebRTC for decoding video streams using platform hardware.";
|
"Support in WebRTC for decoding video streams using platform hardware.";
|
||||||
@@ -1604,6 +1612,7 @@ const char kWebrtcHwDecodingDescription[
|
@@ -1737,6 +1745,7 @@ const char kWebrtcHwDecodingDescription[
|
||||||
const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding";
|
const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding";
|
||||||
const char kWebrtcHwEncodingDescription[] =
|
const char kWebrtcHwEncodingDescription[] =
|
||||||
"Support in WebRTC for encoding video streams using platform hardware.";
|
"Support in WebRTC for encoding video streams using platform hardware.";
|
||||||
|
@ -159,7 +159,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
|
|
||||||
const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
|
const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
|
||||||
const char kWebrtcHwH264EncodingDescription[] =
|
const char kWebrtcHwH264EncodingDescription[] =
|
||||||
@@ -2434,14 +2443,16 @@ const char kTranslateNewUxDescription[]
|
@@ -2561,14 +2570,16 @@ const char kTabStripKeyboardFocusDescrip
|
||||||
|
|
||||||
// Chrome OS -------------------------------------------------------------------
|
// Chrome OS -------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
extern const char kAcceleratedVideoDecodeName[];
|
extern const char kAcceleratedVideoDecodeName[];
|
||||||
extern const char kAcceleratedVideoDecodeDescription[];
|
extern const char kAcceleratedVideoDecodeDescription[];
|
||||||
|
|
||||||
@@ -1498,13 +1502,17 @@ extern const char kPermissionPromptPersi
|
@@ -1569,13 +1573,17 @@ extern const char kPermissionPromptPersi
|
||||||
|
|
||||||
#endif // defined(OS_MACOSX)
|
#endif // defined(OS_MACOSX)
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
|
|
||||||
--- a/content/browser/gpu/compositor_util.cc
|
--- a/content/browser/gpu/compositor_util.cc
|
||||||
+++ b/content/browser/gpu/compositor_util.cc
|
+++ b/content/browser/gpu/compositor_util.cc
|
||||||
@@ -98,7 +98,11 @@ const GpuFeatureData GetGpuFeatureData(s
|
@@ -99,7 +99,11 @@ const GpuFeatureData GetGpuFeatureData(s
|
||||||
{"video_decode",
|
{"video_decode",
|
||||||
manager->GetFeatureStatus(
|
manager->GetFeatureStatus(
|
||||||
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
|
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
|
||||||
|
@ -227,7 +227,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
true},
|
true},
|
||||||
--- a/content/browser/gpu/gpu_process_host.cc
|
--- a/content/browser/gpu/gpu_process_host.cc
|
||||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||||
@@ -120,7 +120,7 @@ static const char* const kSwitchNames[]
|
@@ -132,7 +132,7 @@ static const char* const kSwitchNames[]
|
||||||
switches::kDisableGLExtensions,
|
switches::kDisableGLExtensions,
|
||||||
switches::kDisableLogging,
|
switches::kDisableLogging,
|
||||||
switches::kDisableShaderNameHashing,
|
switches::kDisableShaderNameHashing,
|
||||||
|
@ -238,7 +238,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
--- a/content/browser/renderer_host/media/video_capture_browsertest.cc
|
--- a/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||||
+++ b/content/browser/renderer_host/media/video_capture_browsertest.cc
|
+++ b/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||||
@@ -164,8 +164,13 @@ class VideoCaptureBrowserTest : public C
|
@@ -163,8 +163,13 @@ class VideoCaptureBrowserTest : public C
|
||||||
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||||
switches::kUseFakeJpegDecodeAccelerator);
|
switches::kUseFakeJpegDecodeAccelerator);
|
||||||
} else {
|
} else {
|
||||||
|
@ -282,7 +282,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
return;
|
return;
|
||||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||||
@@ -2530,7 +2530,11 @@ void RenderProcessHostImpl::PropagateBro
|
@@ -2524,7 +2524,11 @@ void RenderProcessHostImpl::PropagateBro
|
||||||
switches::kDefaultTileHeight,
|
switches::kDefaultTileHeight,
|
||||||
switches::kDisable2dCanvasImageChromium,
|
switches::kDisable2dCanvasImageChromium,
|
||||||
switches::kDisableAcceleratedJpegDecoding,
|
switches::kDisableAcceleratedJpegDecoding,
|
||||||
|
@ -294,7 +294,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
switches::kDisableBackgroundTimerThrottling,
|
switches::kDisableBackgroundTimerThrottling,
|
||||||
switches::kDisableBreakpad,
|
switches::kDisableBreakpad,
|
||||||
switches::kDisableCompositorUkmForTests,
|
switches::kDisableCompositorUkmForTests,
|
||||||
@@ -2663,8 +2667,10 @@ void RenderProcessHostImpl::PropagateBro
|
@@ -2658,8 +2662,10 @@ void RenderProcessHostImpl::PropagateBro
|
||||||
switches::kDisableMojoRenderer,
|
switches::kDisableMojoRenderer,
|
||||||
#endif
|
#endif
|
||||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||||
|
@ -323,8 +323,8 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
private:
|
private:
|
||||||
--- a/content/gpu/BUILD.gn
|
--- a/content/gpu/BUILD.gn
|
||||||
+++ b/content/gpu/BUILD.gn
|
+++ b/content/gpu/BUILD.gn
|
||||||
@@ -125,4 +125,8 @@ target(link_target_type, "gpu_sources")
|
@@ -130,4 +130,8 @@ target(link_target_type, "gpu_sources")
|
||||||
if (is_desktop_linux && (!is_chromecast || is_cast_desktop_build)) {
|
(!is_chromecast || is_cast_desktop_build)) {
|
||||||
configs += [ "//build/config/linux/dri" ]
|
configs += [ "//build/config/linux/dri" ]
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
@ -334,7 +334,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
}
|
}
|
||||||
--- a/content/gpu/gpu_main.cc
|
--- a/content/gpu/gpu_main.cc
|
||||||
+++ b/content/gpu/gpu_main.cc
|
+++ b/content/gpu/gpu_main.cc
|
||||||
@@ -273,7 +273,7 @@ int GpuMain(const MainFunctionParams& pa
|
@@ -286,7 +286,7 @@ int GpuMain(const MainFunctionParams& pa
|
||||||
|
|
||||||
base::PlatformThread::SetName("CrGpuMain");
|
base::PlatformThread::SetName("CrGpuMain");
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
// Set thread priority before sandbox initialization.
|
// Set thread priority before sandbox initialization.
|
||||||
base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
|
base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
|
||||||
#endif
|
#endif
|
||||||
@@ -302,7 +302,7 @@ int GpuMain(const MainFunctionParams& pa
|
@@ -315,7 +315,7 @@ int GpuMain(const MainFunctionParams& pa
|
||||||
GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
|
GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
|
||||||
|
|
||||||
base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
|
base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
|
||||||
|
@ -362,7 +362,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
#include "content/browser/gpu/gpu_process_host.h"
|
#include "content/browser/gpu/gpu_process_host.h"
|
||||||
#include "content/public/common/content_features.h"
|
#include "content/public/common/content_features.h"
|
||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
@@ -55,10 +56,18 @@ const gpu::GpuPreferences GetGpuPreferen
|
@@ -55,9 +56,17 @@ const gpu::GpuPreferences GetGpuPreferen
|
||||||
gpu_preferences.in_process_gpu =
|
gpu_preferences.in_process_gpu =
|
||||||
command_line->HasSwitch(switches::kInProcessGPU);
|
command_line->HasSwitch(switches::kInProcessGPU);
|
||||||
gpu_preferences.disable_accelerated_video_decode =
|
gpu_preferences.disable_accelerated_video_decode =
|
||||||
|
@ -376,12 +376,10 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
|
+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
|
||||||
+#else
|
+#else
|
||||||
command_line->HasSwitch(switches::kDisableAcceleratedVideoEncode);
|
command_line->HasSwitch(switches::kDisableAcceleratedVideoEncode);
|
||||||
-#if BUILDFLAG(ENABLE_WEBRTC)
|
|
||||||
+#endif
|
+#endif
|
||||||
+#if BUILDFLAG(ENABLE_WEBRTC) && (defined(OS_CHROMEOS) || defined(OS_ANDROID))
|
#if defined(OS_WIN)
|
||||||
gpu_preferences.disable_web_rtc_hw_encoding =
|
uint32_t enable_accelerated_vpx_decode_val =
|
||||||
command_line->HasSwitch(switches::kDisableWebRtcHWEncoding);
|
gpu::GpuPreferences::VPX_VENDOR_MICROSOFT;
|
||||||
#endif
|
|
||||||
--- a/content/public/common/content_switches.cc
|
--- a/content/public/common/content_switches.cc
|
||||||
+++ b/content/public/common/content_switches.cc
|
+++ b/content/public/common/content_switches.cc
|
||||||
@@ -78,12 +78,21 @@ const char kDisable3DAPIs[]
|
@@ -78,12 +78,21 @@ const char kDisable3DAPIs[]
|
||||||
|
@ -407,7 +405,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
// Disables hardware acceleration of video decode, where available.
|
// Disables hardware acceleration of video decode, where available.
|
||||||
const char kDisableAcceleratedVideoDecode[] =
|
const char kDisableAcceleratedVideoDecode[] =
|
||||||
"disable-accelerated-video-decode";
|
"disable-accelerated-video-decode";
|
||||||
@@ -888,11 +897,13 @@ const char kZygoteProcess[]
|
@@ -859,11 +868,13 @@ const char kZygoteProcess[]
|
||||||
// ignores this switch on its stable and beta channels.
|
// ignores this switch on its stable and beta channels.
|
||||||
const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
|
const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
|
||||||
|
|
||||||
|
@ -435,7 +433,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[];
|
CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[];
|
||||||
CONTENT_EXPORT extern const char kDisableAcceleratedVideoEncode[];
|
CONTENT_EXPORT extern const char kDisableAcceleratedVideoEncode[];
|
||||||
CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
|
CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
|
||||||
@@ -107,6 +111,9 @@ CONTENT_EXPORT extern const char kDisabl
|
@@ -106,6 +110,9 @@ CONTENT_EXPORT extern const char kDisabl
|
||||||
CONTENT_EXPORT extern const char kDomAutomationController[];
|
CONTENT_EXPORT extern const char kDomAutomationController[];
|
||||||
extern const char kDisable2dCanvasClipAntialiasing[];
|
extern const char kDisable2dCanvasClipAntialiasing[];
|
||||||
CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[];
|
CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[];
|
||||||
|
@ -445,7 +443,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
|
CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
|
||||||
CONTENT_EXPORT extern const char kEnableAutomation[];
|
CONTENT_EXPORT extern const char kEnableAutomation[];
|
||||||
CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
|
CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
|
||||||
@@ -244,8 +251,10 @@ CONTENT_EXPORT extern const char kZygote
|
@@ -240,8 +247,10 @@ CONTENT_EXPORT extern const char kZygote
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||||
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
|
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
|
||||||
|
@ -458,7 +456,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
|
CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
|
||||||
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||||
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||||
@@ -245,12 +245,19 @@ void PeerConnectionDependencyFactory::In
|
@@ -282,10 +282,18 @@ void PeerConnectionDependencyFactory::In
|
||||||
|
|
||||||
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
|
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
|
||||||
if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
|
if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
|
||||||
|
@ -469,20 +467,17 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
+#endif
|
+#endif
|
||||||
decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
|
decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
|
||||||
|
|
||||||
- if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) {
|
|
||||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||||
+ if (cmd_line->HasSwitch(switches::kEnableAcceleratedVideo))
|
+ if (cmd_line->HasSwitch(switches::kEnableAcceleratedVideo))
|
||||||
+#else
|
+#else
|
||||||
+ if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
|
if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
|
||||||
+#endif
|
+#endif
|
||||||
encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
|
encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
|
||||||
- }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OS_ANDROID)
|
|
||||||
--- a/content/renderer/render_thread_impl.cc
|
--- a/content/renderer/render_thread_impl.cc
|
||||||
+++ b/content/renderer/render_thread_impl.cc
|
+++ b/content/renderer/render_thread_impl.cc
|
||||||
@@ -1485,7 +1485,11 @@ media::GpuVideoAcceleratorFactories* Ren
|
@@ -1581,7 +1581,11 @@ media::GpuVideoAcceleratorFactories* Ren
|
||||||
scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
|
scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
|
||||||
GetMediaThreadTaskRunner();
|
GetMediaThreadTaskRunner();
|
||||||
const bool enable_video_accelerator =
|
const bool enable_video_accelerator =
|
||||||
|
@ -516,8 +511,8 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
"cr_bugs": [145531, 332596, 571899, 629434],
|
"cr_bugs": [145531, 332596, 571899, 629434],
|
||||||
--- a/media/gpu/BUILD.gn
|
--- a/media/gpu/BUILD.gn
|
||||||
+++ b/media/gpu/BUILD.gn
|
+++ b/media/gpu/BUILD.gn
|
||||||
@@ -24,6 +24,14 @@ if (is_mac) {
|
@@ -482,6 +482,14 @@ if (use_v4l2_codec || use_vaapi || is_ma
|
||||||
import("//build/config/mac/mac_sdk.gni")
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+if (is_desktop_linux && use_vaapi) {
|
+if (is_desktop_linux && use_vaapi) {
|
||||||
|
@ -529,9 +524,9 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
if (use_vaapi) {
|
if (use_vaapi) {
|
||||||
action("libva_generate_stubs") {
|
test("jpeg_encode_accelerator_unittest") {
|
||||||
extra_header = "vaapi/va_stub_header.fragment"
|
deps = [
|
||||||
@@ -353,6 +361,10 @@ component("gpu") {
|
@@ -542,6 +550,10 @@ if (use_v4l2_codec || use_vaapi) {
|
||||||
if (use_ozone) {
|
if (use_ozone) {
|
||||||
deps += [ "//ui/ozone" ]
|
deps += [ "//ui/ozone" ]
|
||||||
}
|
}
|
||||||
|
@ -540,5 +535,5 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||||
+ public_configs = [ ":libva_config" ]
|
+ public_configs = [ ":libva_config" ]
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (is_win) {
|
|
Loading…
Add table
Reference in a new issue