summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Baz2018-07-26 17:04:04 +0200
committerMaxim Baz2018-07-26 17:32:57 +0200
commita2cb3caad2f7c9e7c05cabf0ba8a9b437e2a7353 (patch)
tree4d475c4e383e3ca8d24b858c232b631474caa50b
parent66781ed2d3b0f6c8be3c18e54b68839bcdc8d928 (diff)
downloadaur-a2cb3caad2f7c9e7c05cabf0ba8a9b437e2a7353.tar.gz
Update to 68.0.3440.75
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD25
-rw-r--r--chromium-cors-string-r0.patch51
-rw-r--r--chromium-libjpeg-r0.patch62
-rw-r--r--chromium-libwebp-shim-r0.patch43
-rw-r--r--chromium-vaapi-r19.patch (renamed from chromium-vaapi-r18.patch)83
-rw-r--r--remove-dependency-on-ffmpeg-internals-for-start-time.patch260
7 files changed, 221 insertions, 321 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b3de84ad2730..640fdfd4e2fd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = chromium-vaapi
pkgdesc = Chromium compiled with VA-API support for Intel Graphics
- pkgver = 67.0.3396.99
+ pkgver = 68.0.3440.75
pkgrel = 1
url = https://www.chromium.org/Home
install = chromium.install
@@ -53,24 +53,28 @@ 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-67.0.3396.99.tar.xz
+ source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-68.0.3440.75.tar.xz
source = chromium-launcher-6.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v6.tar.gz
- source = remove-dependency-on-ffmpeg-internals-for-start-time.patch
source = x11-fix-mixup-between-DIP-pixel-coordinates.patch
source = blink-disable-XML-catalogs-at-runtime.patch
+ source = chromium-cors-string-r0.patch
source = chromium-ffmpeg-r1.patch
+ source = chromium-libjpeg-r0.patch
+ source = chromium-libwebp-shim-r0.patch
source = chromium-widevine-r2.patch
source = chromium-skia-harmony.patch
- source = chromium-vaapi-r18.patch
- sha256sums = 452d6b9d8df6c88600aaeff3fad4c065574fd6dbee804e628b70e73a39c0a02a
+ source = chromium-vaapi-r19.patch
+ sha256sums = dc17783267853bdc0fb726363d2b8e30a0bf43b6cc2c768e1f37c92e8eb59541
sha256sums = 04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1
- sha256sums = 2cc80f5ed8a9b42495a0f3ab3c1bae026b9081972269a1b6d407331d33f7d257
sha256sums = e2c2754536243a60fa70541bbd4121715eccd83caa8f1fb1873bd994cd81f871
sha256sums = 98a5c41cf9687c52ee380d2b683c95387334c76254479c347bdb733646dab815
+ sha256sums = f4141e48a25a1403250e9040c18936a16250ab707064dd54103066f40c7db41c
sha256sums = aa885330bc4180b78d915f9dfdfc3210038a0acab7b16735ea9828ab6a633bde
+ sha256sums = 6b8fc570607631d3558e99a82e92c11eeae9c960ebb0a83c13d46344d4b6adca
+ sha256sums = b368f3827ee4c47c942085e3d2cfbea43f8899b101e01500dbf6a7b01b2b29e0
sha256sums = 02c69bb3954087db599def7f5b6d65cf8f7cf2ed81dfbdaa4bb7b51863b4df15
sha256sums = feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3
- sha256sums = a7dbcbfc5ec18606c260df67b98fb2440fe59a4c9ede0823fc43f3bcf439887b
+ sha256sums = 4646e9f54a182cd7f7bb2df57063a729307c83959d6c4e6ca9ebd82bea9fbace
pkgname = chromium-vaapi
diff --git a/PKGBUILD b/PKGBUILD
index ec49c363406a..d04b8b77bcdd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=chromium-vaapi
-pkgver=67.0.3396.99
+pkgver=68.0.3440.75
pkgrel=1
_launcher_ver=6
pkgdesc="Chromium compiled with VA-API support for Intel Graphics"
@@ -32,22 +32,26 @@ optdepends=('pepper-flash: support for Flash content'
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
- remove-dependency-on-ffmpeg-internals-for-start-time.patch
x11-fix-mixup-between-DIP-pixel-coordinates.patch
blink-disable-XML-catalogs-at-runtime.patch
+ chromium-cors-string-r0.patch
chromium-ffmpeg-r1.patch
+ chromium-libjpeg-r0.patch
+ chromium-libwebp-shim-r0.patch
chromium-widevine-r2.patch
chromium-skia-harmony.patch
- chromium-vaapi-r18.patch)
-sha256sums=('452d6b9d8df6c88600aaeff3fad4c065574fd6dbee804e628b70e73a39c0a02a'
+ chromium-vaapi-r19.patch)
+sha256sums=('dc17783267853bdc0fb726363d2b8e30a0bf43b6cc2c768e1f37c92e8eb59541'
'04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1'
- '2cc80f5ed8a9b42495a0f3ab3c1bae026b9081972269a1b6d407331d33f7d257'
'e2c2754536243a60fa70541bbd4121715eccd83caa8f1fb1873bd994cd81f871'
'98a5c41cf9687c52ee380d2b683c95387334c76254479c347bdb733646dab815'
+ 'f4141e48a25a1403250e9040c18936a16250ab707064dd54103066f40c7db41c'
'aa885330bc4180b78d915f9dfdfc3210038a0acab7b16735ea9828ab6a633bde'
+ '6b8fc570607631d3558e99a82e92c11eeae9c960ebb0a83c13d46344d4b6adca'
+ 'b368f3827ee4c47c942085e3d2cfbea43f8899b101e01500dbf6a7b01b2b29e0'
'02c69bb3954087db599def7f5b6d65cf8f7cf2ed81dfbdaa4bb7b51863b4df15'
'feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3'
- 'a7dbcbfc5ec18606c260df67b98fb2440fe59a4c9ede0823fc43f3bcf439887b')
+ '4646e9f54a182cd7f7bb2df57063a729307c83959d6c4e6ca9ebd82bea9fbace')
# 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
@@ -91,9 +95,6 @@ prepare() {
sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
tools/generate_shim_headers/generate_shim_headers.py
- # https://crbug.com/731766
- patch -Np1 -i ../remove-dependency-on-ffmpeg-internals-for-start-time.patch
-
# https://crbug.com/707721
patch -Np1 -i ../x11-fix-mixup-between-DIP-pixel-coordinates.patch
@@ -104,7 +105,10 @@ prepare() {
patch -Np4 -i ../chromium-skia-harmony.patch
# Fixes from Gentoo
+ patch -Np1 -i ../chromium-cors-string-r0.patch
patch -Np1 -i ../chromium-ffmpeg-r1.patch
+ patch -Np1 -i ../chromium-libjpeg-r0.patch
+ patch -Np1 -i ../chromium-libwebp-shim-r0.patch
patch -Np1 -i ../chromium-widevine-r2.patch
# Remove compiler flags not supported by our system clang
@@ -120,7 +124,7 @@ prepare() {
# VA-API patch
msg2 'Applying VA-API patches'
- patch -Np1 -i ../chromium-vaapi-r18.patch
+ patch -Np1 -i ../chromium-vaapi-r19.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
@@ -159,6 +163,7 @@ build() {
'host_toolchain="//build/toolchain/linux/unbundle:default"'
'clang_use_chrome_plugins=false'
'is_official_build=true' # implies is_cfi=true on x86_64
+ 'use_cfi_icall=false' # https://crbug.com/866290
'is_debug=false'
'treat_warnings_as_errors=false'
'fieldtrial_testing_like_official_build=true'
diff --git a/chromium-cors-string-r0.patch b/chromium-cors-string-r0.patch
new file mode 100644
index 000000000000..b724cd44df70
--- /dev/null
+++ b/chromium-cors-string-r0.patch
@@ -0,0 +1,51 @@
+From 01d891fa0790950549c7bedb34edf869827a372e Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jose.dapena@lge.com>
+Date: Thu, 31 May 2018 17:03:37 +0000
+Subject: [PATCH] CORS legacy: add missing string include
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The cors_legacy.h file includes declarations using std::string, but
+it is not declared due to missing #include <string>.
+
+Also drop unneeded declarations in .cpp file.
+
+Change-Id: I00df799f84a6c3530c2f12f1e52d24c7d9bd6bfd
+Reviewed-on: https://chromium-review.googlesource.com/1080707
+Reviewed-by: Tom Sepez <tsepez@chromium.org>
+Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
+Cr-Commit-Position: refs/heads/master@{#563282}
+---
+ services/network/public/cpp/cors/cors_legacy.cc | 2 --
+ services/network/public/cpp/cors/cors_legacy.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/services/network/public/cpp/cors/cors_legacy.cc b/services/network/public/cpp/cors/cors_legacy.cc
+index 8f32ac3be64e..f01af63619b5 100644
+--- a/services/network/public/cpp/cors/cors_legacy.cc
++++ b/services/network/public/cpp/cors/cors_legacy.cc
+@@ -5,8 +5,6 @@
+ #include "services/network/public/cpp/cors/cors_legacy.h"
+
+ #include <algorithm>
+-#include <string>
+-#include <vector>
+
+ #include "url/gurl.h"
+ #include "url/url_util.h"
+diff --git a/services/network/public/cpp/cors/cors_legacy.h b/services/network/public/cpp/cors/cors_legacy.h
+index d2cdf026ca3a..dc9295a92c47 100644
+--- a/services/network/public/cpp/cors/cors_legacy.h
++++ b/services/network/public/cpp/cors/cors_legacy.h
+@@ -5,6 +5,7 @@
+ #ifndef SERVICES_NETWORK_PUBLIC_CPP_CORS_CORS_LEGACY_H_
+ #define SERVICES_NETWORK_PUBLIC_CPP_CORS_CORS_LEGACY_H_
+
++#include <string>
+ #include <vector>
+
+ #include "base/component_export.h"
+--
+2.17.1
+
diff --git a/chromium-libjpeg-r0.patch b/chromium-libjpeg-r0.patch
new file mode 100644
index 000000000000..5354281caced
--- /dev/null
+++ b/chromium-libjpeg-r0.patch
@@ -0,0 +1,62 @@
+From c6b0194f7a4d9f494b2d51f46d2c332e2e5f4050 Mon Sep 17 00:00:00 2001
+From: Daniel Bratell <bratell@opera.com>
+Date: Mon, 28 May 2018 13:13:01 +0000
+Subject: [PATCH] Use the same libjpeg in all of blink/platform
+
+The normal libjpeg renames some symbols with macros so if its
+headers are included together with libjpeg-turbo's headers
+in the same translation unit, there will be an inconsistent
+renaming of libjpeg symbols. This happened in some extreme
+jumbo configuration and resulted in confising linker errors.
+
+This patch changes an include so that jpeglib.h becomes included
+the same way everywhere.
+
+Change-Id: I7f122d0919d58371bb40dc0097a766b857b9815e
+Reviewed-on: https://chromium-review.googlesource.com/1073423
+Reviewed-by: Kentaro Hara <haraken@chromium.org>
+Commit-Queue: Daniel Bratell <bratell@opera.com>
+Cr-Commit-Position: refs/heads/master@{#562243}
+---
+ .../renderer/platform/image-encoders/image_encoder.cc | 11 +++++++++++
+ .../renderer/platform/image-encoders/image_encoder.h | 2 --
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
+index 0c7f14c7c0e4..4c450f5d6783 100644
+--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
++++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
+@@ -4,6 +4,17 @@
+
+ #include "third_party/blink/renderer/platform/image-encoders/image_encoder.h"
+
++#include "build/build_config.h"
++
++#if defined(OS_WIN)
++#include <basetsd.h> // Included before jpeglib.h because of INT32 clash
++#endif // OS_WIN
++#include <stdio.h> // Needed by jpeglib.h
++
++#include "jpeglib.h" // for JPEG_MAX_DIMENSION
++
++#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
++
+ namespace blink {
+
+ bool ImageEncoder::Encode(Vector<unsigned char>* dst,
+diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder.h b/third_party/blink/renderer/platform/image-encoders/image_encoder.h
+index 0d1460f34827..40306097d507 100644
+--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.h
++++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.h
+@@ -7,8 +7,6 @@
+
+ #include "third_party/blink/renderer/platform/platform_export.h"
+ #include "third_party/blink/renderer/platform/wtf/vector.h"
+-#include "third_party/libjpeg/jpeglib.h" // for JPEG_MAX_DIMENSION
+-#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
+ #include "third_party/skia/include/core/SkStream.h"
+ #include "third_party/skia/include/encode/SkJpegEncoder.h"
+ #include "third_party/skia/include/encode/SkPngEncoder.h"
+--
+2.17.1
+
diff --git a/chromium-libwebp-shim-r0.patch b/chromium-libwebp-shim-r0.patch
new file mode 100644
index 000000000000..cb387a4a0030
--- /dev/null
+++ b/chromium-libwebp-shim-r0.patch
@@ -0,0 +1,43 @@
+diff --git a/build/linux/unbundle/libwebp.gn b/build/linux/unbundle/libwebp.gn
+index ab92adecf400..12574d87be58 100644
+--- a/build/linux/unbundle/libwebp.gn
++++ b/build/linux/unbundle/libwebp.gn
+@@ -2,12 +2,34 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
++import("//build/config/linux/pkg_config.gni")
++import("//build/shim_headers.gni")
++
++pkg_config("system_libwebp") {
++ packages = [
++ "libwebp",
++ "libwebpdemux",
++ "libwebpmux",
++ ]
++}
++
++shim_headers("libwebp_shim") {
++ root_path = "src"
++ headers = [
++ "webp/decode.h",
++ "webp/demux.h",
++ "webp/encode.h",
++ "webp/mux.h",
++ "webp/mux_types.h",
++ "webp/types.h",
++ ]
++}
++
+ source_set("libwebp_webp") {
+- libs = [
+- "webp",
+- "webpdemux",
+- "webpmux",
++ deps = [
++ ":libwebp_shim",
+ ]
++ public_configs = [ ":system_libwebp" ]
+ }
+
+ group("libwebp") {
diff --git a/chromium-vaapi-r18.patch b/chromium-vaapi-r19.patch
index c8f6cd53b1ab..9d94843043c5 100644
--- a/chromium-vaapi-r18.patch
+++ b/chromium-vaapi-r19.patch
@@ -36,10 +36,10 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
-@@ -1285,12 +1285,14 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1277,12 +1277,14 @@ const FeatureEntry kFeatureEntries[] = {
+ {"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName,
flag_descriptions::kUiPartialSwapDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
- #if BUILDFLAG(ENABLE_WEBRTC)
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
{"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
@@ -51,7 +51,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
{"enable-webrtc-hw-h264-encoding",
flag_descriptions::kWebrtcHwH264EncodingName,
flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
-@@ -1613,6 +1615,13 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1611,6 +1613,13 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kShowTouchHudDescription, kOsCrOS,
SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)},
#endif // OS_CHROMEOS
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
{
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
-@@ -1620,6 +1629,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1618,6 +1627,7 @@ const FeatureEntry kFeatureEntries[] = {
kOsMac | kOsWin | kOsCrOS | kOsAndroid,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
@@ -73,7 +73,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
#if defined(OS_WIN)
{"enable-hdr", flag_descriptions::kEnableHDRName,
flag_descriptions::kEnableHDRDescription, kOsWin,
-@@ -2310,12 +2320,17 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -2296,12 +2306,17 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kOpenVR)},
#endif // ENABLE_OPENVR
#endif // ENABLE_VR
@@ -118,15 +118,17 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
::switches::kDisableBlinkFeatures,
::switches::kDisableCastStreamingHWEncoding,
::switches::kDisableGpu,
-@@ -162,7 +168,7 @@ void DeriveCommandLine(const GURL& start
+@@ -159,8 +165,10 @@ void DeriveCommandLine(const GURL& start
::switches::kDisableWebGLImageChromium,
::switches::kEnableWebGLImageChromium,
::switches::kEnableWebVR,
--#if BUILDFLAG(ENABLE_WEBRTC)
-+#if BUILDFLAG(ENABLE_WEBRTC) && (defined(OS_CHROMEOS) || defined(OS_ANDROID))
++#if (defined(OS_CHROMEOS) || defined(OS_ANDROID))
::switches::kDisableWebRtcHWDecoding,
::switches::kDisableWebRtcHWEncoding,
- #endif
++#endif
+ ::switches::kOzonePlatform,
+ ash::switches::kAshEnableTabletMode,
+ ash::switches::kAshEnableWaylandServer,
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -14,6 +14,13 @@ const char kAccelerated2dCanvasDescripti
@@ -143,7 +145,7 @@ 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.";
-@@ -1742,6 +1749,7 @@ const char kWebrtcEchoCanceller3Name[] =
+@@ -1845,6 +1852,7 @@ const char kWebrtcEchoCanceller3Name[] =
const char kWebrtcEchoCanceller3Description[] =
"Experimental WebRTC echo canceller (AEC3).";
@@ -151,7 +153,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
const char kWebrtcHwDecodingDescription[] =
"Support in WebRTC for decoding video streams using platform hardware.";
-@@ -1749,6 +1757,7 @@ const char kWebrtcHwDecodingDescription[
+@@ -1852,6 +1860,7 @@ const char kWebrtcHwDecodingDescription[
const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding";
const char kWebrtcHwEncodingDescription[] =
"Support in WebRTC for encoding video streams using platform hardware.";
@@ -159,7 +161,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
const char kWebrtcHwH264EncodingDescription[] =
-@@ -2590,14 +2599,16 @@ const char kTabStripKeyboardFocusDescrip
+@@ -2659,14 +2668,16 @@ const char kTabStripKeyboardFocusDescrip
// Chrome OS -------------------------------------------------------------------
@@ -190,7 +192,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
extern const char kAcceleratedVideoDecodeName[];
extern const char kAcceleratedVideoDecodeDescription[];
-@@ -1589,13 +1593,17 @@ extern const char kPermissionPromptPersi
+@@ -1627,13 +1631,17 @@ extern const char kPermissionPromptPersi
#endif // defined(OS_MACOSX)
@@ -213,32 +215,33 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
-@@ -124,7 +124,11 @@ const GpuFeatureData GetGpuFeatureData(s
+@@ -149,7 +149,11 @@ const GpuFeatureData GetGpuFeatureData(
{"video_decode",
- SafeGetFeatureStatus(manager,
+ SafeGetFeatureStatus(gpu_feature_info,
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},
+ "Accelerated video decode has been disabled, either via blacklist, "
+ "about:flags or the command line.",
+ true, true},
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
-@@ -134,7 +134,7 @@ static const char* const kSwitchNames[]
+@@ -185,7 +185,9 @@ static const char* const kSwitchNames[]
switches::kDisableGLExtensions,
switches::kDisableLogging,
switches::kDisableShaderNameHashing,
--#if BUILDFLAG(ENABLE_WEBRTC)
-+#if BUILDFLAG(ENABLE_WEBRTC) && !defined(OS_LINUX)
++#if !defined(OS_LINUX)
switches::kDisableWebRtcHWEncoding,
- #endif
++#endif
#if defined(OS_WIN)
+ switches::kEnableAcceleratedVpxDecode,
+ #endif
--- a/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(
switches::kUseFakeJpegDecodeAccelerator);
} else {
@@ -254,7 +257,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
-@@ -65,15 +65,21 @@ void VideoCaptureGpuJpegDecoder::Initial
+@@ -66,15 +66,21 @@ void VideoCaptureGpuJpegDecoder::Initial
bool is_platform_supported =
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kUseFakeJpegDecodeAccelerator);
@@ -282,7 +285,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
-@@ -2704,7 +2704,11 @@ void RenderProcessHostImpl::PropagateBro
+@@ -2691,7 +2691,11 @@ void RenderProcessHostImpl::PropagateBro
switches::kDefaultTileHeight,
switches::kDisable2dCanvasImageChromium,
switches::kDisableAcceleratedJpegDecoding,
@@ -294,10 +297,10 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
switches::kDisableBackgroundTasks,
switches::kDisableBackgroundTimerThrottling,
switches::kDisableBreakpad,
-@@ -2842,8 +2846,10 @@ void RenderProcessHostImpl::PropagateBro
+@@ -2825,8 +2829,10 @@ void RenderProcessHostImpl::PropagateBro
+ #if BUILDFLAG(ENABLE_RUNTIME_MEDIA_RENDERER_SELECTION)
switches::kDisableMojoRenderer,
#endif
- #if BUILDFLAG(ENABLE_WEBRTC)
+#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
switches::kDisableWebRtcHWDecoding,
switches::kDisableWebRtcHWEncoding,
@@ -323,7 +326,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
private:
--- a/content/gpu/BUILD.gn
+++ b/content/gpu/BUILD.gn
-@@ -130,4 +130,8 @@ target(link_target_type, "gpu_sources")
+@@ -134,4 +134,8 @@ target(link_target_type, "gpu_sources")
(!is_chromecast || is_cast_desktop_build)) {
configs += [ "//build/config/linux/dri" ]
}
@@ -354,15 +357,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
--- a/content/public/browser/gpu_utils.cc
+++ b/content/public/browser/gpu_utils.cc
-@@ -7,6 +7,7 @@
- #include "base/command_line.h"
- #include "base/single_thread_task_runner.h"
- #include "base/strings/string_number_conversions.h"
-+#include "build/build_config.h"
- #include "content/browser/gpu/gpu_process_host.h"
- #include "content/public/common/content_features.h"
- #include "content/public/common/content_switches.h"
-@@ -55,9 +56,17 @@ const gpu::GpuPreferences GetGpuPreferen
+@@ -58,9 +58,17 @@ const gpu::GpuPreferences GetGpuPreferen
gpu_preferences.in_process_gpu =
command_line->HasSwitch(switches::kInProcessGPU);
gpu_preferences.disable_accelerated_video_decode =
@@ -405,7 +400,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";
-@@ -867,11 +876,13 @@ const char kZygoteProcess[]
+@@ -856,11 +865,13 @@ const char kWaitForDebuggerChildren[]
// ignores this switch on its stable and beta channels.
const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
@@ -433,7 +428,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[];
CONTENT_EXPORT extern const char kDisableAcceleratedVideoEncode[];
CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
-@@ -107,6 +111,9 @@ CONTENT_EXPORT extern const char kDisabl
+@@ -105,6 +109,9 @@ CONTENT_EXPORT extern const char kDisabl
CONTENT_EXPORT extern const char kDomAutomationController[];
extern const char kDisable2dCanvasClipAntialiasing[];
CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[];
@@ -443,9 +438,9 @@ 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[];
-@@ -242,8 +249,10 @@ CONTENT_EXPORT extern const char kZygote
+@@ -237,8 +244,10 @@ CONTENT_EXPORT extern const char kValida
+ CONTENT_EXPORT extern const char kWaitForDebuggerChildren[];
- #if BUILDFLAG(ENABLE_WEBRTC)
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
+#if defined(OS_CHROMEOS)
CONTENT_EXPORT extern const char kDisableWebRtcHWDecoding[];
@@ -477,7 +472,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
-@@ -1578,7 +1578,11 @@ media::GpuVideoAcceleratorFactories* Ren
+@@ -1479,7 +1479,11 @@ media::GpuVideoAcceleratorFactories* Ren
kGpuStreamIdMedia, kGpuStreamPriorityMedia);
const bool enable_video_accelerator =
@@ -511,7 +506,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
-@@ -491,6 +491,14 @@ if (use_v4l2_codec || use_vaapi || is_ma
+@@ -500,6 +500,14 @@ if (use_v4l2_codec || use_vaapi || is_ma
}
}
@@ -526,7 +521,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
if (use_vaapi) {
test("jpeg_encode_accelerator_unittest") {
deps = [
-@@ -551,6 +559,10 @@ if (use_v4l2_codec || use_vaapi) {
+@@ -558,6 +566,10 @@ if (use_v4l2_codec || use_vaapi) {
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
diff --git a/remove-dependency-on-ffmpeg-internals-for-start-time.patch b/remove-dependency-on-ffmpeg-internals-for-start-time.patch
deleted file mode 100644
index a514695cfc37..000000000000
--- a/remove-dependency-on-ffmpeg-internals-for-start-time.patch
+++ /dev/null
@@ -1,260 +0,0 @@
-From f9535bd6d61d7e0b2cb452e6976a914d4ee62a2b Mon Sep 17 00:00:00 2001
-From: Dale Curtis <dalecurtis@chromium.org>
-Date: Thu, 17 May 2018 23:44:41 +0000
-Subject: [PATCH] Remove dependency on ffmpeg internals for start time
- calculations.
-
-Some theora clips still have issues, but using first_dts where
-we know it's the same as the first pts resolves the lingering
-issues. It also looks like we don't need to use pts_buffer now.
-
-This does the following small fixes:
-- MEDIA_LOG(DEBUG) -> MEDIA_LOG(ERROR) for negative ts error.
-- Enables previous disabled test in more limited state.
-- Adds kNoFFmpegTimestamp so static_cast<int64_t>(AV_NOPTS_VALUE)
-is no longer necessary everywhere. A followup patch set will use
-this is more places.
-- Removes pts_buffer and packet_buffer inspection.
-
-BUG=731766
-TEST=all tests pass.
-
-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: I5aadf67a3b5ea2d2a8dd19bbddd7b107208094c5
-Reviewed-on: https://chromium-review.googlesource.com/1064538
-Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
-Reviewed-by: Frank Liberato <liberato@chromium.org>
-Cr-Commit-Position: refs/heads/master@{#559737}
----
- media/ffmpeg/ffmpeg_common.h | 5 +-
- media/filters/ffmpeg_demuxer.cc | 88 +++++++-----------------
- media/filters/ffmpeg_demuxer_unittest.cc | 24 +++----
- 3 files changed, 37 insertions(+), 80 deletions(-)
-
-diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
-index ec33068fb84f..f641d6bcf92e 100644
---- a/media/ffmpeg/ffmpeg_common.h
-+++ b/media/ffmpeg/ffmpeg_common.h
-@@ -28,9 +28,6 @@ extern "C" {
- MSVC_PUSH_DISABLE_WARNING(4244);
- #include <libavcodec/avcodec.h>
- #include <libavformat/avformat.h>
--#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
--#include <libavformat/internal.h>
--#endif // !BUILDFLAG(USE_SYSTEM_FFMPEG)
- #include <libavformat/avio.h>
- #include <libavutil/avutil.h>
- #include <libavutil/imgutils.h>
-@@ -42,6 +39,8 @@ MSVC_POP_WARNING();
-
- namespace media {
-
-+constexpr int64_t kNoFFmpegTimestamp = static_cast<int64_t>(AV_NOPTS_VALUE);
-+
- class AudioDecoderConfig;
- class EncryptionScheme;
- class VideoDecoderConfig;
-diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
-index 49ca01c4dc0b..7402ce16ab5e 100644
---- a/media/filters/ffmpeg_demuxer.cc
-+++ b/media/filters/ffmpeg_demuxer.cc
-@@ -85,29 +85,26 @@ static base::TimeDelta FramesToTimeDelta(int frames, double sample_rate) {
- frames * base::Time::kMicrosecondsPerSecond / sample_rate);
- }
-
--static base::TimeDelta ExtractStartTime(AVStream* stream,
-- base::TimeDelta start_time_estimate) {
-- DCHECK(start_time_estimate != kNoTimestamp);
-- if (stream->start_time == static_cast<int64_t>(AV_NOPTS_VALUE)) {
-- return start_time_estimate == kInfiniteDuration ? base::TimeDelta()
-- : start_time_estimate;
-+static base::TimeDelta ExtractStartTime(AVStream* stream) {
-+ // The default start time is zero.
-+ base::TimeDelta start_time;
-+
-+ // First try to use the |start_time| value as is.
-+ if (stream->start_time != kNoFFmpegTimestamp)
-+ start_time = ConvertFromTimeBase(stream->time_base, stream->start_time);
-+
-+ // Next try to use the first DTS value, for codecs where we know PTS == DTS
-+ // (excludes all H26x codecs). The start time must be returned in PTS.
-+ if (stream->first_dts != kNoFFmpegTimestamp &&
-+ stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
-+ stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
-+ stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
-+ const base::TimeDelta first_pts =
-+ ConvertFromTimeBase(stream->time_base, stream->first_dts);
-+ if (first_pts < start_time)
-+ start_time = first_pts;
- }
-
-- // First try the lower of the estimate and the |start_time| value.
-- base::TimeDelta start_time =
-- std::min(ConvertFromTimeBase(stream->time_base, stream->start_time),
-- start_time_estimate);
--
-- // Next see if the first buffered pts value is usable.
-- if (stream->pts_buffer[0] != static_cast<int64_t>(AV_NOPTS_VALUE)) {
-- const base::TimeDelta buffered_pts =
-- ConvertFromTimeBase(stream->time_base, stream->pts_buffer[0]);
-- if (buffered_pts < start_time)
-- start_time = buffered_pts;
-- }
--
-- // NOTE: Do not use AVStream->first_dts since |start_time| should be a
-- // presentation timestamp.
- return start_time;
- }
-
-@@ -513,7 +510,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
- buffer->set_duration(kNoTimestamp);
- }
-
-- // Note: If pts is AV_NOPTS_VALUE, stream_timestamp will be kNoTimestamp.
-+ // Note: If pts is kNoFFmpegTimestamp, stream_timestamp will be kNoTimestamp.
- const base::TimeDelta stream_timestamp =
- ConvertStreamTimestamp(stream_->time_base, packet->pts);
-
-@@ -556,8 +553,8 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
- // code paths below; otherwise they should be treated as a parse error.
- if ((!fixup_chained_ogg_ || last_packet_timestamp_ == kNoTimestamp) &&
- buffer->timestamp() < base::TimeDelta()) {
-- MEDIA_LOG(DEBUG, media_log_)
-- << "FFmpegDemuxer: unfixable negative timestamp";
-+ MEDIA_LOG(ERROR, media_log_)
-+ << "FFmpegDemuxer: unfixable negative timestamp.";
- demuxer_->NotifyDemuxerError(DEMUXER_ERROR_COULD_NOT_PARSE);
- return;
- }
-@@ -863,7 +860,7 @@ std::string FFmpegDemuxerStream::GetMetadata(const char* key) const {
- base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp(
- const AVRational& time_base,
- int64_t timestamp) {
-- if (timestamp == static_cast<int64_t>(AV_NOPTS_VALUE))
-+ if (timestamp == kNoFFmpegTimestamp)
- return kNoTimestamp;
-
- return ConvertFromTimeBase(time_base, timestamp);
-@@ -1256,42 +1253,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
- AVFormatContext* format_context = glue_->format_context();
- streams_.resize(format_context->nb_streams);
-
-- // Estimate the start time for each stream by looking through the packets
-- // buffered during avformat_find_stream_info(). These values will be
-- // considered later when determining the actual stream start time.
-- //
-- // These packets haven't been completely processed yet, so only look through
-- // these values if the AVFormatContext has a valid start time.
-- //
-- // If no estimate is found, the stream entry will be kInfiniteDuration.
-- std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
-- kInfiniteDuration);
--#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
-- const AVFormatInternal* internal = format_context->internal;
-- if (internal && internal->packet_buffer &&
-- format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
-- struct AVPacketList* packet_buffer = internal->packet_buffer;
-- while (packet_buffer != internal->packet_buffer_end) {
-- DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
-- start_time_estimates.size());
-- const AVStream* stream =
-- format_context->streams[packet_buffer->pkt.stream_index];
-- if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
-- const base::TimeDelta packet_pts =
-- ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
-- // We ignore kNoTimestamp here since -int64_t::min() is possible; see
-- // https://crbug.com/700501. Technically this is a valid value, but in
-- // practice shouldn't occur, so just ignore it when estimating.
-- if (packet_pts != kNoTimestamp && packet_pts != kInfiniteDuration &&
-- packet_pts < start_time_estimates[stream->index]) {
-- start_time_estimates[stream->index] = packet_pts;
-- }
-- }
-- packet_buffer = packet_buffer->next;
-- }
-- }
--#endif // !BUILDFLAG(USE_SYSTEM_FFMPEG)
--
- std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
-
- DCHECK(track_id_to_demux_stream_map_.empty());
-@@ -1440,8 +1401,7 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
-
- max_duration = std::max(max_duration, streams_[i]->duration());
-
-- base::TimeDelta start_time =
-- ExtractStartTime(stream, start_time_estimates[i]);
-+ base::TimeDelta start_time = ExtractStartTime(stream);
-
- // Note: This value is used for seeking, so we must take the true value and
- // not the one possibly clamped to zero below.
-@@ -1479,7 +1439,7 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
- if (text_enabled_)
- AddTextStreams();
-
-- if (format_context->duration != static_cast<int64_t>(AV_NOPTS_VALUE)) {
-+ if (format_context->duration != kNoFFmpegTimestamp) {
- // If there is a duration value in the container use that to find the
- // maximum between it and the duration from A/V streams.
- const AVRational av_time_base = {1, AV_TIME_BASE};
-diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
-index 71dbed07b376..b09816a3ba3a 100644
---- a/media/filters/ffmpeg_demuxer_unittest.cc
-+++ b/media/filters/ffmpeg_demuxer_unittest.cc
-@@ -696,12 +696,9 @@ TEST_F(FFmpegDemuxerTest, Read_InvalidNegativeTimestamp) {
- ReadUntilEndOfStream(GetStream(DemuxerStream::AUDIO));
- }
-
--// TODO(dalecurtis): Test is disabled since FFmpeg does not currently guarantee
--// the order of demuxed packets in OGG containers. Re-enable and fix key frame
--// expectations once we decide to either workaround it or attempt a fix
--// upstream. See http://crbug.com/387996.
--TEST_F(FFmpegDemuxerTest,
-- DISABLED_Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
-+// Android has no Theora support, so these tests doesn't work.
-+#if !defined(OS_ANDROID)
-+TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
- // Many ogg files have negative starting timestamps, so ensure demuxing and
- // seeking work correctly with a negative start time.
- CreateDemuxer("bear.ogv");
-@@ -711,8 +708,12 @@ TEST_F(FFmpegDemuxerTest,
- DemuxerStream* video = GetStream(DemuxerStream::VIDEO);
- DemuxerStream* audio = GetStream(DemuxerStream::AUDIO);
-
-- // Run the test twice with a seek in between.
-- for (int i = 0; i < 2; ++i) {
-+ // Run the test once (should be twice..., see note) with a seek in between.
-+ //
-+ // TODO(dalecurtis): We only run the test once since FFmpeg does not currently
-+ // guarantee the order of demuxed packets in OGG containers. See
-+ // http://crbug.com/387996.
-+ for (int i = 0; i < 1; ++i) {
- audio->Read(
- NewReadCBWithCheckedDiscard(FROM_HERE, 40, 0, kInfiniteDuration, true));
- base::RunLoop().Run();
-@@ -731,10 +732,10 @@ TEST_F(FFmpegDemuxerTest,
- video->Read(NewReadCB(FROM_HERE, 5751, 0, true));
- base::RunLoop().Run();
-
-- video->Read(NewReadCB(FROM_HERE, 846, 33367, true));
-+ video->Read(NewReadCB(FROM_HERE, 846, 33367, false));
- base::RunLoop().Run();
-
-- video->Read(NewReadCB(FROM_HERE, 1255, 66733, true));
-+ video->Read(NewReadCB(FROM_HERE, 1255, 66733, false));
- base::RunLoop().Run();
-
- // Seek back to the beginning and repeat the test.
-@@ -747,9 +748,6 @@ TEST_F(FFmpegDemuxerTest,
- // Same test above, but using sync2.ogv which has video stream muxed before the
- // audio stream, so seeking based only on start time will fail since ffmpeg is
- // essentially just seeking based on file position.
--//
--// Android has no Theora support, so this test doesn't work.
--#if !defined(OS_ANDROID)
- TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Sync) {
- // Many ogg files have negative starting timestamps, so ensure demuxing and
- // seeking work correctly with a negative start time.
---
-2.17.0
-