summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoundSonic12018-03-11 08:30:14 +0100
committerSoundSonic12018-03-11 08:30:14 +0100
commit217356132e61bb31cb77c9e659374b32b517cc33 (patch)
treee0510c24d3fa340de15daa43b540992296857a3c
parente023aec4945d0e8cdf89fc3861fd82e826420b73 (diff)
downloadaur-217356132e61bb31cb77c9e659374b32b517cc33.tar.gz
Update to 65.0.3325.146
-rw-r--r--.SRCINFO35
-rw-r--r--PKGBUILD57
-rw-r--r--chromium-math.h-r0.patch29
-rw-r--r--chromium-memcpy-r0.patch35
-rw-r--r--chromium-omnibox-unescape-fragment.patch437
-rw-r--r--chromium-stdint.patch21
-rw-r--r--chromium-use-fromUTF8-for-UnicodeString-construction.patch68
-rw-r--r--chromium-vaapi-init-r16.patch (renamed from chromium-vaapi-init.patch)78
-rw-r--r--chromium-vaapi-move.patch.gzbin121449 -> 0 bytes
-rw-r--r--chromium-vaapi-r16.patch206
-rw-r--r--chromium-vaapi-rgbx.patch35
11 files changed, 205 insertions, 796 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0568f31a1178..fb129c32f329 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = chromium-vaapi
pkgdesc = Chromium compiled with VA-API support for Intel Graphics
- pkgver = 64.0.3282.186
+ pkgver = 65.0.3325.146
pkgrel = 1
url = https://www.chromium.org/Home
install = chromium.install
@@ -32,17 +32,18 @@ pkgbase = chromium-vaapi
depends = hicolor-icon-theme
depends = libva
depends = flac
+ depends = fontconfig
depends = libvpx
depends = icu
depends = opus
depends = minizip
+ depends = harfbuzz
depends = libxslt
+ depends = freetype2
depends = re2
depends = libwebp
depends = libjpeg
depends = snappy
- depends = freetype2
- depends = harfbuzz
optdepends = pepper-flash: support for Flash content
optdepends = kdialog: needed for file dialogs in KDE
optdepends = gnome-keyring: for storing passwords in GNOME keyring
@@ -50,32 +51,26 @@ pkgbase = chromium-vaapi
optdepends = libva-intel-driver: Needed to support VA-API for Intel graphics cards
provides = chromium
conflicts = chromium
- source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-64.0.3282.186.tar.xz
+ source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-65.0.3325.146.tar.xz
source = chromium-launcher-5.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v5.tar.gz
- source = chromium-64.0.3282.186.txt::https://chromium.googlesource.com/chromium/src.git/+/64.0.3282.186?format=TEXT
- source = chromium-use-fromUTF8-for-UnicodeString-construction.patch
- source = chromium-omnibox-unescape-fragment.patch
+ source = chromium-65.0.3325.146.txt::https://chromium.googlesource.com/chromium/src.git/+/65.0.3325.146?format=TEXT
source = chromium-skia-harmony.patch
- source = chromium-memcpy-r0.patch
source = chromium-clang-r2.patch
+ source = chromium-math.h-r0.patch
+ source = chromium-stdint.patch
source = chromium-widevine.patch
- source = chromium-vaapi-move.patch.gz
- source = chromium-vaapi-init.patch
- source = chromium-vaapi-rgbx.patch
+ source = chromium-vaapi-init-r16.patch
source = chromium-vaapi-r16.patch
- sha256sums = 5fd0218759231ac00cc729235823592f6fd1e4a00ff64780a5fed7ab210f1860
+ sha256sums = cb4f2f3f5a3344f7c452b61f8086d4b4e56af6f5bc34309c3ede8be6b4ab81a3
sha256sums = 4dc3428f2c927955d9ae117f2fb24d098cc6dd67adb760ac9c82b522ec8b0587
- sha256sums = e73f69942af1ba730a700151973fa6309b0586ff45bf35a7fea43f52b54a9cb5
- sha256sums = c82c830bac7ab328a76d85fb141e150a17d02d97138a6daa4720a8a8c371a402
- sha256sums = 814eb2cecb10cb697e24036b08aac41e88d0e38971741f9e946200764e2401ae
+ sha256sums = adfeb830af4c9b55c4a6481ef245e82ad2b9fc3cfe0fe339b30baa8573f701e7
sha256sums = feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3
- sha256sums = 455f0029987d9f0532bd9a5250669af5146a9c2b65b776d4a6e2499e8aca7bb4
sha256sums = 4495e8b29dae242c79ffe4beefc5171eb3c7aacb7e9aebfd2d4d69b9d8c958d3
+ sha256sums = fe0ab86aa5b0072db730eccda3e1582ebed4af25815bfd49fe0da24cf63ca902
+ sha256sums = c00d2506f1078b38a8ebec474a7318e76a61db1298afb40088a34210f137210f
sha256sums = d6fdcb922e5a7fbe15759d39ccc8ea4225821c44d98054ce0f23f9d1f00c9808
- sha256sums = 12d6663bc61845414b284bb9e2d455e0f4e40f5ae69d035f00505ce9c9403169
- sha256sums = 8a81a14af625c8b79006d1b9b4321d5487bc2e56a3fb3a677f9a8dab369be7af
- sha256sums = 0a9186ab591773f8fb6cbc908f9bbf4bc1508f1095b6c1cd7479aac945045373
- sha256sums = b82047df666e6bbf66e0c0911d20c5001bd1100fd08adafa92cac5f02a887a01
+ sha256sums = acae2de43c123f19523c4fca3af19c671acbe76f76bd40e285fe3b08cddb7044
+ sha256sums = 5bc4f5dc5e9c8d71cf273338f65e82efcebc902e645affb35659532dcf9ad1af
pkgname = chromium-vaapi
diff --git a/PKGBUILD b/PKGBUILD
index 5e3322aa1f5e..985a9f0a036d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=chromium-vaapi
-pkgver=64.0.3282.186
+pkgver=65.0.3325.146
pkgrel=1
_launcher_ver=5
pkgdesc="Chromium compiled with VA-API support for Intel Graphics"
@@ -32,39 +32,33 @@ install=chromium.install
source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz
chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
chromium-$pkgver.txt::https://chromium.googlesource.com/chromium/src.git/+/$pkgver?format=TEXT
- chromium-use-fromUTF8-for-UnicodeString-construction.patch
- chromium-omnibox-unescape-fragment.patch
chromium-skia-harmony.patch
- chromium-memcpy-r0.patch
chromium-clang-r2.patch
+ chromium-math.h-r0.patch
+ chromium-stdint.patch
chromium-widevine.patch
- chromium-vaapi-move.patch.gz
- chromium-vaapi-init.patch
- chromium-vaapi-rgbx.patch
+ chromium-vaapi-init-r16.patch
chromium-vaapi-r16.patch)
-sha256sums=('5fd0218759231ac00cc729235823592f6fd1e4a00ff64780a5fed7ab210f1860'
+sha256sums=('cb4f2f3f5a3344f7c452b61f8086d4b4e56af6f5bc34309c3ede8be6b4ab81a3'
'4dc3428f2c927955d9ae117f2fb24d098cc6dd67adb760ac9c82b522ec8b0587'
- 'e73f69942af1ba730a700151973fa6309b0586ff45bf35a7fea43f52b54a9cb5'
- 'c82c830bac7ab328a76d85fb141e150a17d02d97138a6daa4720a8a8c371a402'
- '814eb2cecb10cb697e24036b08aac41e88d0e38971741f9e946200764e2401ae'
+ 'adfeb830af4c9b55c4a6481ef245e82ad2b9fc3cfe0fe339b30baa8573f701e7'
'feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3'
- '455f0029987d9f0532bd9a5250669af5146a9c2b65b776d4a6e2499e8aca7bb4'
'4495e8b29dae242c79ffe4beefc5171eb3c7aacb7e9aebfd2d4d69b9d8c958d3'
+ 'fe0ab86aa5b0072db730eccda3e1582ebed4af25815bfd49fe0da24cf63ca902'
+ 'c00d2506f1078b38a8ebec474a7318e76a61db1298afb40088a34210f137210f'
'd6fdcb922e5a7fbe15759d39ccc8ea4225821c44d98054ce0f23f9d1f00c9808'
- '12d6663bc61845414b284bb9e2d455e0f4e40f5ae69d035f00505ce9c9403169'
- '8a81a14af625c8b79006d1b9b4321d5487bc2e56a3fb3a677f9a8dab369be7af'
- '0a9186ab591773f8fb6cbc908f9bbf4bc1508f1095b6c1cd7479aac945045373'
- 'b82047df666e6bbf66e0c0911d20c5001bd1100fd08adafa92cac5f02a887a01')
+ 'acae2de43c123f19523c4fca3af19c671acbe76f76bd40e285fe3b08cddb7044'
+ '5bc4f5dc5e9c8d71cf273338f65e82efcebc902e645affb35659532dcf9ad1af')
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
# Keys are the names in the above script; values are the dependencies in Arch
readonly -A _system_libs=(
#[ffmpeg]=ffmpeg # https://crbug.com/731766
[flac]=flac
- #[fontconfig]=fontconfig # Enable for M65
- #[freetype]=freetype2 # Using 'use_system_freetype=true' until M65
- #[harfbuzz-ng]=harfbuzz # Using 'use_system_harfbuzz=true' until M65
+ [fontconfig]=fontconfig
+ [freetype]=freetype2
+ [harfbuzz-ng]=harfbuzz
[icu]=icu
[libdrm]=
[libjpeg]=libjpeg
@@ -82,10 +76,8 @@ readonly -A _system_libs=(
readonly _unwanted_bundled_libs=(
${!_system_libs[@]}
${_system_libs[libjpeg]+libjpeg_turbo}
- freetype
- harfbuzz-ng
)
-depends+=(${_system_libs[@]} freetype2 harfbuzz)
+depends+=(${_system_libs[@]})
# Google API keys (see https://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
@@ -112,18 +104,13 @@ prepare() {
sed "s/@WIDEVINE_VERSION@/Pinkie Pie/" ../chromium-widevine.patch |
patch -Np1
- # https://crbug.com/772655
- patch -Np1 -i ../chromium-use-fromUTF8-for-UnicodeString-construction.patch
-
- # https://crbug.com/789163
- patch -Np1 -i ../chromium-omnibox-unescape-fragment.patch
-
# https://crbug.com/skia/6663#c10
patch -Np4 -i ../chromium-skia-harmony.patch
# Fixes from Gentoo
- patch -Np1 -i ../chromium-memcpy-r0.patch
patch -Np1 -i ../chromium-clang-r2.patch
+ patch -Np1 -i ../chromium-math.h-r0.patch
+ patch -Np1 -i ../chromium-stdint.patch
# Remove compiler flags not supported by our system clang
sed -i \
@@ -144,10 +131,9 @@ prepare() {
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
# VA-API patch
- patch -Np1 -i "${srcdir}/chromium-vaapi-move.patch"
- patch -Np1 -i "${srcdir}/chromium-vaapi-init.patch"
- patch -Np1 -i "${srcdir}/chromium-vaapi-rgbx.patch"
- patch -Np1 -i "${srcdir}/chromium-vaapi-r16.patch"
+ msg2 'Applying VA-API patches'
+ patch -Np1 -i ../chromium-vaapi-init-r16.patch
+ patch -Np1 -i ../chromium-vaapi-r16.patch
# Remove bundled libraries for which we will use the system copies; this
# *should* do what the remove_bundled_libraries.py script does, with the
@@ -158,7 +144,7 @@ prepare() {
\! -path "*third_party/$_lib/chromium/*" \
\! -path "*third_party/$_lib/google/*" \
\! -path './base/third_party/icu/*' \
- \! -path './third_party/freetype/src/src/psnames/pstables.h' \
+ \! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
\! -path './third_party/yasm/run_yasm.py' \
\! -regex '.*\.\(gn\|gni\|isolate\)' \
-delete
@@ -200,9 +186,6 @@ build() {
'ffmpeg_branding="Chrome"'
'proprietary_codecs=true'
'link_pulseaudio=true'
- 'use_system_freetype=true'
- 'use_system_harfbuzz=true'
- 'use_gconf=false'
'use_gnome_keyring=false'
'use_gold=false'
'use_lld=false'
diff --git a/chromium-math.h-r0.patch b/chromium-math.h-r0.patch
new file mode 100644
index 000000000000..6c7c747053a1
--- /dev/null
+++ b/chromium-math.h-r0.patch
@@ -0,0 +1,29 @@
+From 9f63f94a11abc34d40ede8b8712fa15b5844a8c0 Mon Sep 17 00:00:00 2001
+From: Tom Anderson <thomasanderson@chromium.org>
+Date: Sat, 27 Jan 2018 20:03:37 +0000
+Subject: [PATCH] Fix build with glibc 2.27
+
+BUG=806340
+TBR=hamelphi@chromium.org
+
+Change-Id: Ib4e5091212d874d9ad88f3e9a1fdfee3ed7e0d5e
+Reviewed-on: https://chromium-review.googlesource.com/890059
+Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
+Reviewed-by: Philippe Hamel <hamelphi@chromium.org>
+Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
+Cr-Commit-Position: refs/heads/master@{#532249}
+---
+
+diff --git a/components/assist_ranker/ranker_example_util.cc b/components/assist_ranker/ranker_example_util.cc
+index 54d4dbd..ceedd8f 100644
+--- a/components/assist_ranker/ranker_example_util.cc
++++ b/components/assist_ranker/ranker_example_util.cc
+@@ -2,6 +2,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+
++#include <math.h>
++
+ #include "components/assist_ranker/ranker_example_util.h"
+ #include "base/bit_cast.h"
+ #include "base/format_macros.h"
diff --git a/chromium-memcpy-r0.patch b/chromium-memcpy-r0.patch
deleted file mode 100644
index dd2fd57d26a6..000000000000
--- a/chromium-memcpy-r0.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 4942f56ceb6d60d6f54ebca8e6eba8ba01c278e8 Mon Sep 17 00:00:00 2001
-From: Tomas Popela <tomas.popela@gmail.com>
-Date: Thu, 7 Dec 2017 22:33:34 +0000
-Subject: [PATCH] memcpy used without including string.h
-
-Compiling Chromium with Clang 4.0.1 and using libstdc++ will fail on using
-memcpy without including string.h.
-
-Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
-Change-Id: Idced1d5de3baf6b520d4a2d61774120642ead1a8
-Reviewed-on: https://chromium-review.googlesource.com/813737
-Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
-Reviewed-by: vmpstr <vmpstr@chromium.org>
-Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
-Cr-Commit-Position: refs/heads/master@{#522579}
----
- cc/paint/raw_memory_transfer_cache_entry.cc | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/cc/paint/raw_memory_transfer_cache_entry.cc b/cc/paint/raw_memory_transfer_cache_entry.cc
-index 9e4660c685ee..95ad50b1a338 100644
---- a/cc/paint/raw_memory_transfer_cache_entry.cc
-+++ b/cc/paint/raw_memory_transfer_cache_entry.cc
-@@ -4,6 +4,8 @@
-
- #include "cc/paint/raw_memory_transfer_cache_entry.h"
-
-+#include <string.h>
-+
- namespace cc {
-
- ClientRawMemoryTransferCacheEntry::ClientRawMemoryTransferCacheEntry(
---
-2.15.1
-
diff --git a/chromium-omnibox-unescape-fragment.patch b/chromium-omnibox-unescape-fragment.patch
deleted file mode 100644
index 59ab04003022..000000000000
--- a/chromium-omnibox-unescape-fragment.patch
+++ /dev/null
@@ -1,437 +0,0 @@
-commit 03f9a90d8a783f9d1a94935ac298338a1e694380
-Author: Eric Lawrence <elawrence@chromium.org>
-Date: Sat Dec 16 04:48:11 2017 +0000
-
- Reland of 'Unescape fragment for display in Omnibox'
-
- The original landing broke EGTests for iOS Simulator and Device which
- were not run by the CQ. This change includes updated EGTests.
-
- TBR=pkasting@chromium.org
-
- Bug: 789163, 643458
- Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
- Change-Id: Ie30afcb7bcba5affc7266d72a10b7f8dc0074314
- Reviewed-on: https://chromium-review.googlesource.com/830093
- Reviewed-by: Eric Lawrence <elawrence@chromium.org>
- Reviewed-by: Peter Kasting <pkasting@chromium.org>
- Reviewed-by: Eugene But <eugenebut@chromium.org>
- Commit-Queue: Eric Lawrence <elawrence@chromium.org>
- Cr-Commit-Position: refs/heads/master@{#524591}
-
-diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
-index 6e5dff47f7ec..24f1056d49d5 100644
---- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
-+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
-@@ -462,3 +462,13 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, TextElideStatus) {
- EXPECT_EQ(omnibox_view_views->GetRenderText()->elide_behavior(),
- gfx::NO_ELIDE);
- }
-+
-+IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FragmentUnescapedForDisplay) {
-+ OmniboxView* view = nullptr;
-+ ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
-+ ui_test_utils::NavigateToURL(browser(),
-+ GURL("https://www.google.com/#%E2%98%83"));
-+
-+ EXPECT_EQ(view->GetText(),
-+ base::UTF8ToUTF16("https://www.google.com/#\u2603"));
-+}
-diff --git a/components/url_formatter/elide_url_unittest.cc b/components/url_formatter/elide_url_unittest.cc
-index 5e0384af72a2..d403ce065f45 100644
---- a/components/url_formatter/elide_url_unittest.cc
-+++ b/components/url_formatter/elide_url_unittest.cc
-@@ -347,15 +347,16 @@ TEST(TextEliderTest, TestElisionSpecialCases) {
- kEllipsisStr + "berkeley.edu:4430/" + kEllipsisStr + "/arbitfilename"},
-
- // Unescaping.
-- {"http://www/%E4%BD%A0%E5%A5%BD?q=%E4%BD%A0%E5%A5%BD#\xe4\xbd\xa0",
-- "www/\xe4\xbd\xa0\xe5\xa5\xbd?q=\xe4\xbd\xa0\xe5\xa5\xbd#" +
-+ {"http://www/%E4%BD%A0%E5%A5%BD?"
-+ "q=%E4%BD%A0%E5%A5%BD#\xe4\xbd\xa0\xe4\xbd\xa0\xe4\xbd\xa0",
-+ "www/\xe4\xbd\xa0\xe5\xa5\xbd?q=\xe4\xbd\xa0\xe5\xa5\xbd#\xe4\xbd\xa0" +
- kEllipsisStr},
-
- // Invalid unescaping for path. The ref will always be valid UTF-8. We
- // don't bother to do too many edge cases, since these are handled by the
- // escaper unittest.
- {"http://www/%E4%A0%E5%A5%BD?q=%E4%BD%A0%E5%A5%BD#\xe4\xbd\xa0",
-- "www/%E4%A0%E5%A5%BD?q=\xe4\xbd\xa0\xe5\xa5\xbd#" + kEllipsisStr},
-+ "www/%E4%A0%E5%A5%BD?q=\xe4\xbd\xa0\xe5\xa5\xbd#\xe4\xbd\xa0"},
- };
-
- RunElisionTest(testcases);
-diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
-index d5c0d314a5de..c422e3d98a72 100644
---- a/components/url_formatter/url_formatter.cc
-+++ b/components/url_formatter/url_formatter.cc
-@@ -586,11 +586,10 @@ base::string16 FormatUrlWithAdjustments(
- NonHostComponentTransform(unescape_rules),
- &url_string, &new_parsed->query, adjustments);
-
-- // Ref. This is valid, unescaped UTF-8, so we can just convert.
- if (parsed.ref.is_valid())
- url_string.push_back('#');
- AppendFormattedComponent(spec, parsed.ref,
-- NonHostComponentTransform(net::UnescapeRule::NONE),
-+ NonHostComponentTransform(unescape_rules),
- &url_string, &new_parsed->ref, adjustments);
- }
-
-diff --git a/components/url_formatter/url_formatter_unittest.cc b/components/url_formatter/url_formatter_unittest.cc
-index 6fd3ece50f7d..5aaf31105a43 100644
---- a/components/url_formatter/url_formatter_unittest.cc
-+++ b/components/url_formatter/url_formatter_unittest.cc
-@@ -828,7 +828,7 @@ TEST(UrlFormatterTest, FormatUrl) {
-
- {"With a port number and a reference",
- "http://www.google.com:8080/#\xE3\x82\xB0", default_format_type,
-- net::UnescapeRule::NORMAL, L"http://www.google.com:8080/#%E3%82%B0", 7},
-+ net::UnescapeRule::NORMAL, L"http://www.google.com:8080/#\x30B0", 7},
-
- // -------- IDN tests --------
- {"Japanese IDN with ja", "http://xn--l8jvb1ey91xtjb.jp",
-@@ -1119,7 +1119,7 @@ TEST(UrlFormatterTest, FormatUrlParsed) {
- kFormatUrlOmitNothing, net::UnescapeRule::NORMAL, &parsed,
- nullptr, nullptr);
- EXPECT_EQ(WideToUTF16(L"http://\x30B0:\x30FC@\x30B0\x30FC\x30B0\x30EB.jp:8080"
-- L"/\x30B0/?q=\x30B0#%E3%82%B0"),
-+ L"/\x30B0/?q=\x30B0#\x30B0"),
- formatted);
- EXPECT_EQ(WideToUTF16(L"\x30B0"),
- formatted.substr(parsed.username.begin, parsed.username.len));
-@@ -1133,7 +1133,7 @@ TEST(UrlFormatterTest, FormatUrlParsed) {
- formatted.substr(parsed.path.begin, parsed.path.len));
- EXPECT_EQ(WideToUTF16(L"q=\x30B0"),
- formatted.substr(parsed.query.begin, parsed.query.len));
-- EXPECT_EQ(WideToUTF16(L"%E3%82%B0"),
-+ EXPECT_EQ(WideToUTF16(L"\x30B0"),
- formatted.substr(parsed.ref.begin, parsed.ref.len));
-
- // Omit_username_password + unescape case.
-@@ -1143,7 +1143,7 @@ TEST(UrlFormatterTest, FormatUrlParsed) {
- kFormatUrlOmitUsernamePassword, net::UnescapeRule::NORMAL,
- &parsed, nullptr, nullptr);
- EXPECT_EQ(WideToUTF16(L"http://\x30B0\x30FC\x30B0\x30EB.jp:8080"
-- L"/\x30B0/?q=\x30B0#%E3%82%B0"),
-+ L"/\x30B0/?q=\x30B0#\x30B0"),
- formatted);
- EXPECT_FALSE(parsed.username.is_valid());
- EXPECT_FALSE(parsed.password.is_valid());
-@@ -1155,7 +1155,7 @@ TEST(UrlFormatterTest, FormatUrlParsed) {
- formatted.substr(parsed.path.begin, parsed.path.len));
- EXPECT_EQ(WideToUTF16(L"q=\x30B0"),
- formatted.substr(parsed.query.begin, parsed.query.len));
-- EXPECT_EQ(WideToUTF16(L"%E3%82%B0"),
-+ EXPECT_EQ(WideToUTF16(L"\x30B0"),
- formatted.substr(parsed.ref.begin, parsed.ref.len));
-
- // View-source case.
-@@ -1389,9 +1389,12 @@ TEST(UrlFormatterTest, FormatUrlWithOffsets) {
- kFormatUrlOmitNothing, net::UnescapeRule::SPACES, unescape_offsets);
-
- const size_t ref_offsets[] = {
-- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
-- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
-- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49};
-+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
-+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
-+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
-+ 30, 31, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos,
-+ 32, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, 33};
-+
- // Unescape to "http://www.google.com/foo.html#\x30B0\x30B0z".
- CheckAdjustedOffsets("http://www.google.com/foo.html#%E3%82%B0%E3%82%B0z",
- kFormatUrlOmitNothing, net::UnescapeRule::NORMAL,
-diff --git a/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm b/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm
-index b67f2a08d0a0..431ad368f07d 100644
---- a/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm
-+++ b/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm
-@@ -59,40 +59,42 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
- // Push 3 URLs. Verify that the URL changed and the status was updated.
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashWithObject"];
- [self assertStatusText:@"pushStateHashWithObject"
-- withURL:pushStateHashWithObjectURL
-+ withOmniboxText:pushStateHashWithObjectURL.GetContent()
- pageLoaded:NO];
-
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStateRootPath"];
- [self assertStatusText:@"pushStateRootPath"
-- withURL:pushStateRootPathURL
-+ withOmniboxText:pushStateRootPathURL.GetContent()
- pageLoaded:NO];
-
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStatePathSpace"];
- [self assertStatusText:@"pushStatePathSpace"
-- withURL:pushStatePathSpaceURL
-+ withOmniboxText:pushStatePathSpaceURL.GetContent()
- pageLoaded:NO];
-
- // Go back and check that the page doesn't load and the status text is updated
- // by the popstate event.
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [self assertStatusText:@"pushStateRootPath"
-- withURL:pushStateRootPathURL
-+ withOmniboxText:pushStateRootPathURL.GetContent()
- pageLoaded:NO];
-
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [self assertStatusText:@"pushStateHashWithObject"
-- withURL:pushStateHashWithObjectURL
-+ withOmniboxText:pushStateHashWithObjectURL.GetContent()
- pageLoaded:NO];
-
- [ChromeEarlGrey tapWebViewElementWithID:@"goBack"];
- const GURL historyTestURL = web::test::HttpServer::MakeUrl(kHistoryTestUrl);
-- [self assertStatusText:NULL withURL:historyTestURL pageLoaded:NO];
-+ [self assertStatusText:nil
-+ withOmniboxText:historyTestURL.GetContent()
-+ pageLoaded:NO];
-
- // Go forward 2 pages and check that the page doesn't load and the status text
- // is updated by the popstate event.
- [ChromeEarlGrey tapWebViewElementWithID:@"goForward2"];
- [self assertStatusText:@"pushStateRootPath"
-- withURL:pushStateRootPathURL
-+ withOmniboxText:pushStateRootPathURL.GetContent()
- pageLoaded:NO];
- }
-
-@@ -108,7 +110,7 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
- web::test::HttpServer::MakeUrl(kReplaceStateHashWithObjectURL);
- [ChromeEarlGrey tapWebViewElementWithID:@"replaceStateHashWithObject"];
- [self assertStatusText:@"replaceStateHashWithObject"
-- withURL:replaceStateHashWithObjectURL
-+ withOmniboxText:replaceStateHashWithObjectURL.GetContent()
- pageLoaded:NO];
-
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
-@@ -119,7 +121,7 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
- [[EarlGrey selectElementWithMatcher:ForwardButton()]
- performAction:grey_tap()];
- [self assertStatusText:@"replaceStateHashWithObject"
-- withURL:replaceStateHashWithObjectURL
-+ withOmniboxText:replaceStateHashWithObjectURL.GetContent()
- pageLoaded:YES];
-
- // Push URL then replace it. Do this twice.
-@@ -127,44 +129,44 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
- web::test::HttpServer::MakeUrl(kPushStateHashStringURL);
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashString"];
- [self assertStatusText:@"pushStateHashString"
-- withURL:pushStateHashStringURL
-+ withOmniboxText:pushStateHashStringURL.GetContent()
- pageLoaded:NO];
-
- const GURL replaceStateHashStringURL =
- web::test::HttpServer::MakeUrl(kReplaceStateHashStringURL);
- [ChromeEarlGrey tapWebViewElementWithID:@"replaceStateHashString"];
- [self assertStatusText:@"replaceStateHashString"
-- withURL:replaceStateHashStringURL
-+ withOmniboxText:replaceStateHashStringURL.GetContent()
- pageLoaded:NO];
-
- const GURL pushStatePathURL =
- web::test::HttpServer::MakeUrl(kPushStatePathURL);
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStatePath"];
- [self assertStatusText:@"pushStatePath"
-- withURL:pushStatePathURL
-+ withOmniboxText:pushStatePathURL.GetContent()
- pageLoaded:NO];
-
- const GURL replaceStateRootPathSpaceURL =
- web::test::HttpServer::MakeUrl(kReplaceStateRootPathSpaceURL);
- [ChromeEarlGrey tapWebViewElementWithID:@"replaceStateRootPathSpace"];
- [self assertStatusText:@"replaceStateRootPathSpace"
-- withURL:replaceStateRootPathSpaceURL
-+ withOmniboxText:replaceStateRootPathSpaceURL.GetContent()
- pageLoaded:NO];
-
- // Go back and check URLs.
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [self assertStatusText:@"replaceStateHashString"
-- withURL:replaceStateHashStringURL
-+ withOmniboxText:replaceStateHashStringURL.GetContent()
- pageLoaded:NO];
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [self assertStatusText:@"replaceStateHashWithObject"
-- withURL:replaceStateHashWithObjectURL
-+ withOmniboxText:replaceStateHashWithObjectURL.GetContent()
- pageLoaded:NO];
-
- // Go forward and check URL.
- [ChromeEarlGrey tapWebViewElementWithID:@"goForward2"];
- [self assertStatusText:@"replaceStateRootPathSpace"
-- withURL:replaceStateRootPathSpaceURL
-+ withOmniboxText:replaceStateRootPathSpaceURL.GetContent()
- pageLoaded:NO];
- }
-
-@@ -180,11 +182,11 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
- web::test::HttpServer::MakeUrl(kPushStateHashStringURL);
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashString"];
- [self assertStatusText:@"pushStateHashString"
-- withURL:pushStateHashStringURL
-+ withOmniboxText:pushStateHashStringURL.GetContent()
- pageLoaded:NO];
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashString"];
- [self assertStatusText:@"pushStateHashString"
-- withURL:pushStateHashStringURL
-+ withOmniboxText:pushStateHashStringURL.GetContent()
- pageLoaded:NO];
-
- // Load a non-pushed URL.
-@@ -194,7 +196,7 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
- [ChromeEarlGrey loadURL:historyTestURL];
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashString"];
- [self assertStatusText:@"pushStateHashString"
-- withURL:pushStateHashStringURL
-+ withOmniboxText:pushStateHashStringURL.GetContent()
- pageLoaded:NO];
-
- // At this point the history looks like this:
-@@ -202,38 +204,54 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
-
- // Go back (to second history.html) and verify page did not load.
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
-- [self assertStatusText:nil withURL:historyTestURL pageLoaded:NO];
-+ [self assertStatusText:nil
-+ withOmniboxText:historyTestURL.GetContent()
-+ pageLoaded:NO];
-
- // Go back twice (to second #string) and verify page did load.
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
-- [self assertStatusText:nil withURL:pushStateHashStringURL pageLoaded:YES];
-+ [self assertStatusText:nil
-+ withOmniboxText:pushStateHashStringURL.GetContent()
-+ pageLoaded:YES];
-
- // Go back once (to first #string) and verify page did not load.
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [self assertStatusText:@"pushStateHashString"
-- withURL:pushStateHashStringURL
-+ withOmniboxText:pushStateHashStringURL.GetContent()
- pageLoaded:NO];
-
- // Go forward 4 entries at once (to third #string) and verify page did load.
- [ChromeEarlGrey tapWebViewElementWithID:@"goForward4"];
-
-- [self assertStatusText:nil withURL:pushStateHashStringURL pageLoaded:YES];
-+ [self assertStatusText:nil
-+ withOmniboxText:pushStateHashStringURL.GetContent()
-+ pageLoaded:YES];
-
- // Go back 4 entries at once (to first #string) and verify page did load.
- [ChromeEarlGrey tapWebViewElementWithID:@"goBack4"];
-
-- [self assertStatusText:NULL withURL:pushStateHashStringURL pageLoaded:YES];
-+ [self assertStatusText:nil
-+ withOmniboxText:pushStateHashStringURL.GetContent()
-+ pageLoaded:YES];
- }
-
- // Tests calling pushState with unicode characters.
- - (void)testHtml5HistoryPushUnicodeCharacters {
-- const GURL pushStateUnicodeURLEncoded = web::test::HttpServer::MakeUrl(
-- "http://ios/testing/data/http_server_files/"
-- "history.html#unicode%E1%84%91");
-- const GURL pushStateUnicode2URLEncoded = web::test::HttpServer::MakeUrl(
-- "http://ios/testing/data/http_server_files/"
-- "history.html#unicode2%E2%88%A2");
-+ // The GURL object %-escapes Unicode characters in the URL's fragment,
-+ // but the omnibox decodes them back to Unicode for display.
-+ std::string pushStateUnicode =
-+ web::test::HttpServer::MakeUrl(
-+ "http://ios/testing/data/http_server_files/"
-+ "history.html#unicode")
-+ .GetContent() +
-+ "\xe1\x84\x91";
-+ std::string pushStateUnicode2 =
-+ web::test::HttpServer::MakeUrl(
-+ "http://ios/testing/data/http_server_files/"
-+ "history.html#unicode2")
-+ .GetContent() +
-+ "\xe2\x88\xa2";
- const char pushStateUnicodeLabel[] = "Action: pushStateUnicodeᄑ";
- NSString* pushStateUnicodeStatus = @"pushStateUnicodeᄑ";
- const char pushStateUnicode2Label[] = "Action: pushStateUnicode2∢";
-@@ -242,21 +260,16 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
- web::test::SetUpFileBasedHttpServer();
- [ChromeEarlGrey loadURL:web::test::HttpServer::MakeUrl(kHistoryTestUrl)];
-
-- // TODO(crbug.com/643458): The fact that the URL shows %-escaped is due to
-- // NSURL escaping to make UIWebView/JS happy. See if it's possible to
-- // represent differently such that it displays unescaped.
- // Do 2 push states with unicode characters.
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStateUnicode"];
- [[EarlGrey
-- selectElementWithMatcher:chrome_test_util::OmniboxText(
-- pushStateUnicodeURLEncoded.GetContent())]
-+ selectElementWithMatcher:chrome_test_util::OmniboxText(pushStateUnicode)]
- assertWithMatcher:grey_notNil()];
- [ChromeEarlGrey waitForWebViewContainingText:pushStateUnicodeLabel];
-
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStateUnicode2"];
- [[EarlGrey
-- selectElementWithMatcher:chrome_test_util::OmniboxText(
-- pushStateUnicode2URLEncoded.GetContent())]
-+ selectElementWithMatcher:chrome_test_util::OmniboxText(pushStateUnicode2)]
- assertWithMatcher:grey_notNil()];
- [ChromeEarlGrey waitForWebViewContainingText:pushStateUnicode2Label];
-
-@@ -266,18 +279,18 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
- [ChromeEarlGrey tapWebViewElementWithID:@"pushStatePath"];
-
- [self assertStatusText:@"pushStatePath"
-- withURL:pushStatePathURL
-+ withOmniboxText:pushStatePathURL.GetContent()
- pageLoaded:NO];
-
- // Go back and check the unicode in the URL and status.
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [self assertStatusText:pushStateUnicode2Status
-- withURL:pushStateUnicode2URLEncoded
-+ withOmniboxText:pushStateUnicode2
- pageLoaded:NO];
-
- [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [self assertStatusText:pushStateUnicodeStatus
-- withURL:pushStateUnicodeURLEncoded
-+ withOmniboxText:pushStateUnicode
- pageLoaded:NO];
- }
-
-@@ -321,10 +334,11 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
-
- #pragma mark - Utility methods
-
--// Assert that status text |status| is displayed in the webview, that "onloaded"
--// text is displayed if pageLoaded is YES, and that the URL is as expected.
-+// Assert that status text |status|, if non-nil, is displayed in the webview,
-+// that the omnibox text is as expected, and that "onload" text is displayed if
-+// pageLoaded is YES.
- - (void)assertStatusText:(NSString*)status
-- withURL:(const GURL&)urlToVerify
-+ withOmniboxText:(const std::string&)omniboxText
- pageLoaded:(BOOL)pageLoaded {
- if (pageLoaded) {
- [ChromeEarlGrey waitForWebViewContainingText:"onload"];
-@@ -332,14 +346,14 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
- [ChromeEarlGrey waitForWebViewNotContainingText:"onload"];
- }
-
-- if (status != NULL) {
-+ if (status != nil) {
- NSString* statusLabel = [NSString stringWithFormat:@"Action: %@", status];
- [ChromeEarlGrey
- waitForWebViewContainingText:base::SysNSStringToUTF8(statusLabel)];
- }
-
-- [[EarlGrey selectElementWithMatcher:chrome_test_util::OmniboxText(
-- urlToVerify.GetContent())]
-+ [[EarlGrey
-+ selectElementWithMatcher:chrome_test_util::OmniboxText(omniboxText)]
- assertWithMatcher:grey_notNil()];
- }
-
diff --git a/chromium-stdint.patch b/chromium-stdint.patch
new file mode 100644
index 000000000000..877443954faa
--- /dev/null
+++ b/chromium-stdint.patch
@@ -0,0 +1,21 @@
+From 0235c2b657d936f3cdb09053776e5929fc84704b Mon Sep 17 00:00:00 2001
+From: Tomas Popela <tomas.popela@gmail.com>
+Date: Wed, 31 Jan 2018 18:57:07 +0000
+Subject: [PATCH] Add missing stdint include
+
+diff --git a/chrome/browser/vr/sample_queue.cc b/chrome/browser/vr/sample_queue.cc
+index c2ca777ce90c..53cb3aab1576 100644
+--- a/chrome/browser/vr/sample_queue.cc
++++ b/chrome/browser/vr/sample_queue.cc
+@@ -2,6 +2,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+
++#include <stdint.h>
++
+ #include "chrome/browser/vr/sample_queue.h"
+
+ namespace vr {
+--
+2.16.2
+
diff --git a/chromium-use-fromUTF8-for-UnicodeString-construction.patch b/chromium-use-fromUTF8-for-UnicodeString-construction.patch
deleted file mode 100644
index 0e0765a27a0f..000000000000
--- a/chromium-use-fromUTF8-for-UnicodeString-construction.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From e58fa0ba66272c5f28828b15d06c7e42a9882b3b Mon Sep 17 00:00:00 2001
-From: Jungshik Shin <jshin@chromium.org>
-Date: Sat, 16 Dec 2017 04:19:27 +0000
-Subject: [PATCH] Use fromUTF8() for UnicodeString construction from UTF-8
-
-Chrome's copy of ICU is built with U_CHARSET_IS_UTF8=1 so that |char *|
-buffer is treated as UTF-8 when constructing UnicodeString() regardless
-of the default encoding of the current locale on Linux or non-Unicode code
-page on Windows.
-
-However, some Linux distros do not set U_CHARSET_IS_UTF=1 when building
-ICU and Chromium build with system_icu crashes when Chromium is run in
-non-UTF-8 locale (e.g. 'C').
-
-To make Chromium work in a non-UTF-8 locale (which is pretty rare these
-days), use 'icu::UnicodeString::fromUTF8(StringPiece)' instead of
-'icu::UnicodeString(const char*)'.
-
-Bug: 772655
-Test: components_unittests --gtest_filter=*IDN*
-Test: Chromium built with system_icu does not crash in C locale.
-Change-Id: I0daa284ec06b8e83814fc70eb8e9e5c96444ebfa
-Reviewed-on: https://chromium-review.googlesource.com/831247
-Reviewed-by: Peter Kasting <pkasting@chromium.org>
-Commit-Queue: Jungshik Shin <jshin@chromium.org>
-Cr-Commit-Position: refs/heads/master@{#524586}
----
- components/url_formatter/idn_spoof_checker.cc | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/components/url_formatter/idn_spoof_checker.cc b/components/url_formatter/idn_spoof_checker.cc
-index a88c5e8f8331..aee748d8a4d5 100644
---- a/components/url_formatter/idn_spoof_checker.cc
-+++ b/components/url_formatter/idn_spoof_checker.cc
-@@ -110,8 +110,8 @@ IDNSpoofChecker::IDNSpoofChecker() {
-
- // These Cyrillic letters look like Latin. A domain label entirely made of
- // these letters is blocked as a simplified whole-script-spoofable.
-- cyrillic_letters_latin_alike_ =
-- icu::UnicodeSet(icu::UnicodeString("[асԁеһіјӏорԛѕԝхуъЬҽпгѵѡ]"), status);
-+ cyrillic_letters_latin_alike_ = icu::UnicodeSet(
-+ icu::UnicodeString::fromUTF8("[асԁеһіјӏорԛѕԝхуъЬҽпгѵѡ]"), status);
- cyrillic_letters_latin_alike_.freeze();
-
- cyrillic_letters_ =
-@@ -141,8 +141,8 @@ IDNSpoofChecker::IDNSpoofChecker() {
- UParseError parse_error;
- diacritic_remover_.reset(icu::Transliterator::createFromRules(
- UNICODE_STRING_SIMPLE("DropAcc"),
-- icu::UnicodeString("::NFD; ::[:Nonspacing Mark:] Remove; ::NFC;"
-- " ł > l; ø > o; đ > d;"),
-+ icu::UnicodeString::fromUTF8("::NFD; ::[:Nonspacing Mark:] Remove; ::NFC;"
-+ " ł > l; ø > o; đ > d;"),
- UTRANS_FORWARD, parse_error, status));
-
- // Supplement the Unicode confusable list by the following mapping.
-@@ -158,7 +158,7 @@ IDNSpoofChecker::IDNSpoofChecker() {
- // - U+0D1F (ട) => s
- extra_confusable_mapper_.reset(icu::Transliterator::createFromRules(
- UNICODE_STRING_SIMPLE("ExtraConf"),
-- icu::UnicodeString(
-+ icu::UnicodeString::fromUTF8(
- "ӏ > l; [кĸκ] > k; п > n; [ƅь] > b; в > b; м > m; н > h; "
- "т > t; [шщ] > w; ട > s;"),
- UTRANS_FORWARD, parse_error, status));
---
-2.15.1
-
diff --git a/chromium-vaapi-init.patch b/chromium-vaapi-init-r16.patch
index 0cd4557b59bd..8b49d2a08e04 100644
--- a/chromium-vaapi-init.patch
+++ b/chromium-vaapi-init-r16.patch
@@ -1,6 +1,6 @@
-From a57aa298ed3c3b76056d6e24fb09db05dca2f465 Mon Sep 17 00:00:00 2001
+From 281edc278272f0650fc190c8539d443ac59157bc Mon Sep 17 00:00:00 2001
From: Daniel Charles <daniel.charles@intel.com>
-Date: Thu, 25 Jan 2018 13:01:37 -0800
+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
@@ -10,18 +10,28 @@ 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=chromium:785117
-TEST="video initialization of h/w dec/enc, VAVDA/VAVEA/VAJDA subjective"
-TEST="testing and include unittests and autotests"
+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
-@@ -28,10 +28,6 @@
+@@ -29,10 +29,6 @@
#include "services/service_manager/sandbox/linux/bpf_gpu_policy_linux.h"
#include "services/service_manager/sandbox/linux/sandbox_linux.h"
@@ -32,7 +42,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
using sandbox::bpf_dsl::Policy;
using sandbox::syscall_broker::BrokerFilePermission;
using sandbox::syscall_broker::BrokerProcess;
-@@ -47,22 +43,6 @@ inline bool IsChromeOS() {
+@@ -48,22 +44,6 @@
#endif
}
@@ -55,7 +65,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
inline bool IsArchitectureArm() {
#if defined(ARCH_CPU_ARM_FAMILY)
return true;
-@@ -87,14 +67,6 @@ inline bool UseLibV4L2() {
+@@ -88,14 +68,6 @@
#endif
}
@@ -70,7 +80,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE;
void AddV4L2GpuWhitelist(
-@@ -259,51 +231,6 @@ void LoadV4L2Libraries() {
+@@ -270,50 +242,6 @@
}
}
@@ -79,8 +89,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
- if (IsArchitectureX86_64() || IsArchitectureI386()) {
- // Accelerated video dlopen()'s some shared objects
- // inside the sandbox, so preload them now.
-- if (options.vaapi_accelerated_video_encode_enabled ||
-- options.accelerated_video_decode_enabled) {
+- if (IsAcceleratedVideoEnabled(options)) {
- if (IsLibVAVersion2()) {
- if (IsArchitectureX86_64()) {
- dlopen("/usr/lib64/va/drivers/i965_drv_video.so", dlopen_flag);
@@ -122,7 +131,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
bool LoadLibrariesForGpu(
const service_manager::SandboxSeccompBPF::Options& options) {
if (IsChromeOS()) {
-@@ -316,7 +243,6 @@ bool LoadLibrariesForGpu(
+@@ -326,7 +254,6 @@
if (options.use_amd_specific_policies)
return LoadAmdGpuLibraries();
}
@@ -130,9 +139,23 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
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
-@@ -163,9 +163,6 @@ class VADisplayState {
+@@ -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:
@@ -142,7 +165,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
// Protected by |va_lock_|.
int refcount_;
-@@ -200,43 +197,12 @@ void VADisplayState::PreSandboxInitializ
+@@ -203,41 +205,17 @@
VADisplayState::Get()->SetDrmFd(drm_file.GetPlatformFile());
}
@@ -181,12 +204,15 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
- static bool result = PostSandboxInitialization();
- if (!result)
-- return false;
--
- if (refcount_++ > 0)
- return true;
++ if (!IsVaInitialized() ||
++#if defined(USE_X11)
++ !IsVa_x11Initialized() ||
++#endif
++ !IsVa_drmInitialized())
+ return false;
-@@ -1367,6 +1333,34 @@ void VaapiWrapper::DeinitializeVpp() {
+ if (refcount_++ > 0)
+@@ -1169,6 +1147,38 @@
// static
void VaapiWrapper::PreSandboxInitialization() {
VADisplayState::PreSandboxInitialization();
@@ -200,6 +226,10 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
+ 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";
@@ -211,13 +241,13 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
+ DVLOG(1) << kErrorMsg;
+#endif
+ }
-+ // next command will dlopen all necessary libraries for
-+ // va-api to function properly, to know:
-+ // libva.so
++
++ // 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)
-+ // libva-x11.so (X11) or libva-drm.so (Ozone).
++ // libcmrt.so (platforms that support it)
+ VASupportedProfiles::Get();
}
- } // namespace media
+ VaapiWrapper::VaapiWrapper()
diff --git a/chromium-vaapi-move.patch.gz b/chromium-vaapi-move.patch.gz
deleted file mode 100644
index a46ea2d430ae..000000000000
--- a/chromium-vaapi-move.patch.gz
+++ /dev/null
Binary files differ
diff --git a/chromium-vaapi-r16.patch b/chromium-vaapi-r16.patch
index 0020ea744eb1..283582d0b4c5 100644
--- a/chromium-vaapi-r16.patch
+++ b/chromium-vaapi-r16.patch
@@ -1,6 +1,6 @@
-From 7f29b44224439377592be2b75da0b86d82d8ad6d Mon Sep 17 00:00:00 2001
+From 4bf343ab8c4a538205f9c1e96a661e40620c716b Mon Sep 17 00:00:00 2001
From: Daniel Charles <daniel.charles@intel.com>
-Date: Wed, 18 Oct 2017 17:27:42 -0700
+Date: Fri, 09 Feb 2018 14:39:27 -0800
Subject: [PATCH] Enable VAVDA, VAVEA and VAJDA on linux with VAAPI only
This patch contains all the changes necessary to use VA-API along with
@@ -24,12 +24,10 @@ video are used. The other flags are kept for ChromeOS and other OSes.
Developer testing was made on skylake hardware, ChromeOS and Ubuntu.
BUG=NONE
-TEST="subjective testing with VAVDA,VAVEA and VAJDA, autotest for encoder"
-TEST="and decoder hardware accelerated"
-TEST="have libva/intel-vaapi-driver installed and not installed in the system"
-TEST="repeat on different hardware families"
-R=posciak@chromium.org
-R=kcwu@chromium.org
+TEST=subjective testing with VAVDA,VAVEA and VAJDA, autotest for encoder
+ and decoder hardware accelerated
+ have libva/intel-vaapi-driver installed and not installed in the system
+ 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
Change-Id: Ifbbf5c9e5221a8b5733fc6d4d0cf984a1f103171
@@ -39,10 +37,10 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1249,12 +1249,14 @@ const FeatureEntry kFeatureEntries[] = {
- flag_descriptions::kEnablePreventLayerSquashingDescription, kOsAll,
- FEATURE_VALUE_TYPE(features::kEnablePreventLayerSquashing)},
+ flag_descriptions::kUiPartialSwapDescription, kOsAll,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
#if BUILDFLAG(ENABLE_WEBRTC)
-+#if !defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
++#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
{"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
@@ -53,8 +51,8 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
{"enable-webrtc-hw-h264-encoding",
flag_descriptions::kWebrtcHwH264EncodingName,
flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
-@@ -1535,6 +1537,13 @@ const FeatureEntry kFeatureEntries[] = {
- flag_descriptions::kShowTouchHudDescription, kOsAll,
+@@ -1550,6 +1552,13 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kShowTouchHudDescription, kOsCrOS,
SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)},
#endif // OS_CHROMEOS
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
@@ -67,15 +65,15 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
{
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
-@@ -1542,6 +1551,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1557,6 +1566,7 @@ const FeatureEntry kFeatureEntries[] = {
kOsMac | kOsWin | kOsCrOS | kOsAndroid,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
+#endif
- {"mojo-video-encode-accelerator",
- flag_descriptions::kMojoVideoEncodeAcceleratorName,
- flag_descriptions::kMojoVideoEncodeAcceleratorDescription,
-@@ -2270,12 +2280,17 @@ const FeatureEntry kFeatureEntries[] = {
+ #if defined(OS_WIN)
+ {"enable-hdr", flag_descriptions::kEnableHDRName,
+ flag_descriptions::kEnableHDRDescription, kOsWin,
+@@ -2268,12 +2278,17 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kOpenVR)},
#endif // ENABLE_OPENVR
#endif // ENABLE_VR
@@ -105,7 +103,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
#include "cc/base/switches.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/boot_times_recorder.h"
-@@ -84,8 +85,13 @@ void DeriveCommandLine(const GURL& start
+@@ -84,9 +85,14 @@ void DeriveCommandLine(const GURL& start
::switches::kDisable2dCanvasImageChromium,
::switches::kDisableAccelerated2dCanvas,
::switches::kDisableAcceleratedJpegDecoding,
@@ -115,11 +113,12 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
+#else
::switches::kDisableAcceleratedMjpegDecode,
::switches::kDisableAcceleratedVideoDecode,
+ ::switches::kDisableAcceleratedVideoEncode,
+#endif
::switches::kDisableBlinkFeatures,
::switches::kDisableCastStreamingHWEncoding,
::switches::kDisableDistanceFieldText,
-@@ -166,7 +172,7 @@ void DeriveCommandLine(const GURL& start
+@@ -164,7 +170,7 @@ void DeriveCommandLine(const GURL& start
::switches::kDisableWebGLImageChromium,
::switches::kEnableWebGLImageChromium,
::switches::kEnableWebVR,
@@ -130,11 +129,11 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
#endif
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
-@@ -19,6 +19,13 @@ const char kAccelerated2dCanvasDescripti
+@@ -14,6 +14,13 @@ const char kAccelerated2dCanvasDescripti
"Enables the use of the GPU to perform 2d canvas rendering instead of "
"using software rendering.";
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
+const char kAcceleratedVideoName[] = "Hardware-accelerated video";
+const char kAcceleratedVideoDescription[] =
+ "Hardware-accelerated video where VA-API driver is installed on the"
@@ -144,15 +143,15 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
const char kAcceleratedVideoDecodeDescription[] =
"Hardware-accelerated video decode where available.";
-@@ -1572,6 +1579,7 @@ const char kWebrtcEchoCanceller3Name[] =
+@@ -1597,6 +1604,7 @@ const char kWebrtcEchoCanceller3Name[] =
const char kWebrtcEchoCanceller3Description[] =
"Experimental WebRTC echo canceller (AEC3).";
-+#if !defined(OS_LINUX) || !defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
const char kWebrtcHwDecodingDescription[] =
"Support in WebRTC for decoding video streams using platform hardware.";
-@@ -1579,6 +1587,7 @@ const char kWebrtcHwDecodingDescription[
+@@ -1604,6 +1612,7 @@ const char kWebrtcHwDecodingDescription[
const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding";
const char kWebrtcHwEncodingDescription[] =
"Support in WebRTC for encoding video streams using platform hardware.";
@@ -160,7 +159,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
const char kWebrtcHwH264EncodingDescription[] =
-@@ -2390,14 +2399,16 @@ const char kTranslateNewUxDescription[]
+@@ -2434,14 +2443,16 @@ const char kTranslateNewUxDescription[]
// Chrome OS -------------------------------------------------------------------
@@ -191,7 +190,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
extern const char kAcceleratedVideoDecodeName[];
extern const char kAcceleratedVideoDecodeDescription[];
-@@ -1480,13 +1484,17 @@ extern const char kPermissionPromptPersi
+@@ -1498,13 +1502,17 @@ extern const char kPermissionPromptPersi
#endif // defined(OS_MACOSX)
@@ -214,75 +213,21 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
-@@ -103,7 +103,11 @@ const GpuFeatureInfo GetGpuFeatureInfo(s
- {"video_decode",
- manager->IsFeatureBlacklisted(
- gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
-+ !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
-+#else
- command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
-+#endif
- "Accelerated video decode has been disabled, either via blacklist,"
- " about:flags or the command line.",
- true},
---- a/content/browser/gpu/gpu_data_manager_impl_private.cc
-+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
-@@ -709,7 +709,11 @@ void GpuDataManagerImplPrivate::AppendRe
- DCHECK(command_line);
-
- if (ShouldDisableAcceleratedVideoDecode(command_line))
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
-+ command_line->AppendSwitch(switches::kEnableAcceleratedVideo);
-+#else
- command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
-+#endif
- }
-
- void GpuDataManagerImplPrivate::AppendGpuCommandLine(
-@@ -810,7 +814,12 @@ void GpuDataManagerImplPrivate::UpdateRe
- prefs->accelerated_2d_canvas_enabled = false;
- }
- if (!ShouldDisableAcceleratedVideoDecode(command_line) &&
-- !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
-+ command_line->HasSwitch(switches::kEnableAcceleratedVideo)
-+#else
-+ !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
-+#endif
-+ ) {
- prefs->pepper_accelerated_video_decode_enabled = true;
- }
- }
-@@ -959,7 +968,13 @@ bool GpuDataManagerImplPrivate::UpdateAc
-
- bool GpuDataManagerImplPrivate::ShouldDisableAcceleratedVideoDecode(
- const base::CommandLine* command_line) const {
-- if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
-+ if (
+@@ -98,7 +98,11 @@ const GpuFeatureData GetGpuFeatureData(s
+ {"video_decode",
+ manager->GetFeatureStatus(
+ gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
-+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo)
++ !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
+#else
-+ command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
+ command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
+#endif
-+ ) {
- // It was already disabled on the command line.
- return false;
- }
+ "Accelerated video decode has been disabled, either via blacklist,"
+ " about:flags or the command line.",
+ true},
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
-@@ -114,13 +114,18 @@ static const char* const kSwitchNames[]
- service_manager::switches::kDisableSeccompFilterSandbox,
- service_manager::switches::kGpuSandboxAllowSysVShm,
- service_manager::switches::kGpuSandboxFailuresFatal,
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
-+ switches::kEnableAcceleratedVideo,
-+#else
-+ switches::kDisableAcceleratedVideoDecode,
-+#endif
- switches::kDisableBreakpad,
- switches::kDisableGpuRasterization,
- switches::kDisableGpuSandbox,
+@@ -120,7 +120,7 @@ static const char* const kSwitchNames[]
switches::kDisableGLExtensions,
switches::kDisableLogging,
switches::kDisableShaderNameHashing,
@@ -309,7 +254,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
--- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
+++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
-@@ -64,15 +64,21 @@ void VideoCaptureGpuJpegDecoder::Initial
+@@ -65,15 +65,21 @@ void VideoCaptureGpuJpegDecoder::Initial
bool is_platform_supported =
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kUseFakeJpegDecodeAccelerator);
@@ -337,7 +282,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
return;
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -2526,7 +2526,11 @@ void RenderProcessHostImpl::PropagateBro
+@@ -2530,7 +2530,11 @@ void RenderProcessHostImpl::PropagateBro
switches::kDefaultTileHeight,
switches::kDisable2dCanvasImageChromium,
switches::kDisableAcceleratedJpegDecoding,
@@ -348,8 +293,8 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
+#endif
switches::kDisableBackgroundTimerThrottling,
switches::kDisableBreakpad,
- switches::kDisableBrowserSideNavigation,
-@@ -2674,8 +2678,10 @@ void RenderProcessHostImpl::PropagateBro
+ switches::kDisableCompositorUkmForTests,
+@@ -2663,8 +2667,10 @@ void RenderProcessHostImpl::PropagateBro
switches::kDisableMojoRenderer,
#endif
#if BUILDFLAG(ENABLE_WEBRTC)
@@ -378,15 +323,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
private:
--- a/content/gpu/BUILD.gn
+++ b/content/gpu/BUILD.gn
-@@ -48,7 +48,6 @@ target(link_target_type, "gpu_sources")
- ]
-
- configs += [ "//content:content_implementation" ]
--
- deps = [
- "//base",
- "//base/third_party/dynamic_annotations",
-@@ -124,4 +123,8 @@ target(link_target_type, "gpu_sources")
+@@ -125,4 +125,8 @@ target(link_target_type, "gpu_sources")
if (is_desktop_linux && (!is_chromecast || is_cast_desktop_build)) {
configs += [ "//build/config/linux/dri" ]
}
@@ -397,16 +334,16 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
}
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
-@@ -271,7 +271,7 @@ int GpuMain(const MainFunctionParams& pa
- // Initializes StatisticsRecorder which tracks UMA histograms.
- base::StatisticsRecorder::Initialize();
+@@ -273,7 +273,7 @@ int GpuMain(const MainFunctionParams& pa
+
+ base::PlatformThread::SetName("CrGpuMain");
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
+#if defined(OS_LINUX)
// Set thread priority before sandbox initialization.
base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
#endif
-@@ -300,7 +300,7 @@ int GpuMain(const MainFunctionParams& pa
+@@ -302,7 +302,7 @@ int GpuMain(const MainFunctionParams& pa
GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
@@ -425,7 +362,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
#include "content/browser/gpu/gpu_process_host.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
-@@ -55,12 +56,19 @@ const gpu::GpuPreferences GetGpuPreferen
+@@ -55,10 +56,18 @@ const gpu::GpuPreferences GetGpuPreferen
gpu_preferences.in_process_gpu =
command_line->HasSwitch(switches::kInProcessGPU);
gpu_preferences.disable_accelerated_video_decode =
@@ -433,17 +370,15 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
+#else
command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
--#if defined(OS_CHROMEOS)
+#endif
+ gpu_preferences.disable_accelerated_video_encode =
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+ gpu_preferences.disable_vaapi_accelerated_video_encode =
+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
-+#elif defined(OS_CHROMEOS)
- gpu_preferences.disable_vaapi_accelerated_video_encode =
- command_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode);
- #endif
++#else
+ command_line->HasSwitch(switches::kDisableAcceleratedVideoEncode);
-#if BUILDFLAG(ENABLE_WEBRTC)
-+#if BUILDFLAG(ENABLE_WEBRTC) && (!defined(OS_LINUX) || defined(OS_CHROMEOS))
++#endif
++#if BUILDFLAG(ENABLE_WEBRTC) && (defined(OS_CHROMEOS) || defined(OS_ANDROID))
gpu_preferences.disable_web_rtc_hw_encoding =
command_line->HasSwitch(switches::kDisableWebRtcHWEncoding);
#endif
@@ -472,7 +407,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
// Disables hardware acceleration of video decode, where available.
const char kDisableAcceleratedVideoDecode[] =
"disable-accelerated-video-decode";
-@@ -903,11 +912,13 @@ const char kZygoteProcess[]
+@@ -888,11 +897,13 @@ const char kZygoteProcess[]
// ignores this switch on its stable and beta channels.
const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
@@ -498,8 +433,8 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
CONTENT_EXPORT extern const char kDisableAcceleratedMjpegDecode[];
+#endif
CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[];
+ CONTENT_EXPORT extern const char kDisableAcceleratedVideoEncode[];
CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
- extern const char kDisableBackingStoreLimit[];
@@ -107,6 +111,9 @@ CONTENT_EXPORT extern const char kDisabl
CONTENT_EXPORT extern const char kDomAutomationController[];
extern const char kDisable2dCanvasClipAntialiasing[];
@@ -510,7 +445,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
CONTENT_EXPORT extern const char kEnableAutomation[];
CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
-@@ -248,8 +255,10 @@ CONTENT_EXPORT extern const char kZygote
+@@ -244,8 +251,10 @@ CONTENT_EXPORT extern const char kZygote
#if BUILDFLAG(ENABLE_WEBRTC)
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
@@ -523,7 +458,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
-@@ -243,10 +243,19 @@ void PeerConnectionDependencyFactory::In
+@@ -245,12 +245,19 @@ void PeerConnectionDependencyFactory::In
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
@@ -540,24 +475,25 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
+#else
+ if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
+#endif
-+ {
encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
- }
+- }
}
+
+ #if defined(OS_ANDROID)
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
-@@ -1495,7 +1495,11 @@ media::GpuVideoAcceleratorFactories* Ren
+@@ -1485,7 +1485,11 @@ media::GpuVideoAcceleratorFactories* Ren
scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
GetMediaThreadTaskRunner();
const bool enable_video_accelerator =
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+ cmd_line->HasSwitch(switches::kEnableAcceleratedVideo);
++ cmd_line->HasSwitch(switches::kEnableAcceleratedVideo) &&
+#else
- !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
+ !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) &&
+#endif
- const bool enable_gpu_memory_buffer_video_frames =
- !is_gpu_compositing_disabled_ &&
- #if defined(OS_MACOSX) || defined(OS_LINUX)
+ (gpu_channel_host->gpu_feature_info()
+ .status_values[gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE] ==
+ gpu::kGpuFeatureStatusEnabled);
--- a/gpu/config/software_rendering_list.json
+++ b/gpu/config/software_rendering_list.json
@@ -373,17 +373,6 @@
@@ -580,7 +516,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
"cr_bugs": [145531, 332596, 571899, 629434],
--- a/media/gpu/BUILD.gn
+++ b/media/gpu/BUILD.gn
-@@ -25,6 +25,14 @@ if (is_mac) {
+@@ -24,6 +24,14 @@ if (is_mac) {
import("//build/config/mac/mac_sdk.gni")
}
@@ -595,7 +531,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
if (use_vaapi) {
action("libva_generate_stubs") {
extra_header = "vaapi/va_stub_header.fragment"
-@@ -356,6 +364,10 @@ component("gpu") {
+@@ -353,6 +361,10 @@ component("gpu") {
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
@@ -606,13 +542,3 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
}
if (is_win) {
---- a/media/gpu/gpu_video_decode_accelerator_factory.cc
-+++ b/media/gpu/gpu_video_decode_accelerator_factory.cc
-@@ -87,6 +87,7 @@ GpuVideoDecodeAcceleratorFactory::GetDec
- // profile (instead of calculating a superset).
- // TODO(posciak,henryhsu): improve this so that we choose a superset of
- // resolutions and other supported profile parameters.
-+ DVLOG(1) << "Get Supported profiles";
- #if defined(OS_WIN)
- capabilities.supported_profiles =
- DXVAVideoDecodeAccelerator::GetSupportedProfiles(gpu_preferences,
diff --git a/chromium-vaapi-rgbx.patch b/chromium-vaapi-rgbx.patch
deleted file mode 100644
index f6e1debf3d06..000000000000
--- a/chromium-vaapi-rgbx.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 51357dc19efbf30328ca05655fbf69886f6e9113 Mon Sep 17 00:00:00 2001
-From: Julien Isorce <julien.isorce@chromium.org>
-Date: Tue, 05 Dec 2017 23:39:45 +0000
-Subject: [PATCH] Allow RGBX for VaapiTFPPicture
-
-Fixes regression on non-ozone platforms and introduced by
- 73d609f366ba6a86324048bbad81527f76d237b5
- https://chromium-review.googlesource.com/787290
-
-Note that the format is only used for sanity check. All the logic is
-done automatically in the vaapi driver's implementation of vaPutSurface.
-
-Bug: 785201
-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: Idc0bdf184874bf2c238e28da6f42f4e3572e9743
-Reviewed-on: https://chromium-review.googlesource.com/807928
-Reviewed-by: Dan Sanders <sandersd@chromium.org>
-Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
-Cr-Commit-Position: refs/heads/master@{#521897}
----
-
-diff --git a/media/gpu/vaapi/vaapi_tfp_picture.cc b/media/gpu/vaapi/vaapi_tfp_picture.cc
-index e9eecce..bd7823c 100644
---- a/media/gpu/vaapi/vaapi_tfp_picture.cc
-+++ b/media/gpu/vaapi/vaapi_tfp_picture.cc
-@@ -72,7 +72,8 @@
- bool VaapiTFPPicture::Allocate(gfx::BufferFormat format) {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- if (format != gfx::BufferFormat::BGRX_8888 &&
-- format != gfx::BufferFormat::BGRA_8888) {
-+ format != gfx::BufferFormat::BGRA_8888 &&
-+ format != gfx::BufferFormat::RGBX_8888) {
- DLOG(ERROR) << "Unsupported format";
- return false;
- }