mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
chromium: update to 61.0.3163.79
This commit is contained in:
parent
803da36ae8
commit
165dd91730
@ -19,15 +19,15 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="chromium"
|
||||
PKG_VERSION="60.0.3112.113"
|
||||
PKG_SHA256="ebfce706a1ea02a92e35f360c7364d1184dacf040b59eade4cb51aa61a4fec59"
|
||||
PKG_REV="107"
|
||||
PKG_VERSION="61.0.3163.79"
|
||||
PKG_SHA256="bdbc139ed86f3b5d1ec3c3b00caeaef4f9ac2c363438f03dded56e217ad10727"
|
||||
PKG_REV="108"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="Mixed"
|
||||
PKG_SITE="http://www.chromium.org/Home"
|
||||
PKG_URL="https://commondatastorage.googleapis.com/chromium-browser-official/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_HOST="toolchain"
|
||||
PKG_DEPENDS_TARGET="chromium:host pciutils dbus libXcomposite libXcursor libXtst alsa-lib bzip2 yasm nss libXScrnSaver libexif ninja:host libpng harfbuzz atk gtk+ libva-vdpau-driver unclutter xdotool"
|
||||
PKG_DEPENDS_HOST="toolchain ninja:host"
|
||||
PKG_DEPENDS_TARGET="chromium:host pciutils dbus libXcomposite libXcursor libXtst alsa-lib bzip2 yasm nss libXScrnSaver libexif libpng harfbuzz atk gtk+ libva-vdpau-driver unclutter xdotool"
|
||||
PKG_SECTION="browser"
|
||||
PKG_SHORTDESC="Chromium Browser: the open-source web browser from Google"
|
||||
PKG_LONGDESC="Chromium Browser ($PKG_VERSION): the open-source web browser from Google"
|
||||
@ -85,6 +85,7 @@ make_target() {
|
||||
'linux_use_bundled_binutils=false'
|
||||
'use_allocator="none"'
|
||||
'use_cups=false'
|
||||
'use_custom_libcxx=false'
|
||||
'use_gconf=false'
|
||||
'use_gnome_keyring=false'
|
||||
'use_gold=false'
|
||||
@ -93,6 +94,7 @@ make_target() {
|
||||
'use_pulseaudio=false'
|
||||
'use_sysroot=true'
|
||||
'use_vulcanize=false'
|
||||
'use_vaapi=true'
|
||||
"target_sysroot=\"${SYSROOT_PREFIX}\""
|
||||
'enable_hangout_services_extension=true'
|
||||
'enable_widevine=true'
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
From c89dff7138aabdc5957b742e8b87486661f6f816 Mon Sep 17 00:00:00 2001
|
||||
From 53b93dfe87fd10cced5d2a2a63072dfc7a2af6e4 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Charles <daniel.charles@intel.com>
|
||||
Date: Tue, 27 Jun 2017 10:44:04 -0700
|
||||
Date: Fri, 28 Jul 2017 16:31:47 -0700
|
||||
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
|
||||
@ -8,16 +8,18 @@ vaapi-driver to run all media use cases supported with hardware acceleration.
|
||||
|
||||
It is intended to remain as experimental accessible from chrome://flags on linux.
|
||||
It requires libva/intel-vaapi-driver to be installed on the system path where
|
||||
chrome is executed. Other drivers could be tested if available.
|
||||
chrome is executed. Other drivers could be tested if available. Flags are
|
||||
kept independent for linux, where this feature has to be enabled before
|
||||
actually using it. This should not change how other OSes use the flags
|
||||
already, the new flags will show at the buttom on the section of unavailable
|
||||
experiments
|
||||
|
||||
The changes cover a range of compiler pre-processor flags to enable the stack.
|
||||
It moves the presandbox operations to the vaapi_wrapper class as the hook
|
||||
function is available there. vaInit will open driver on the correct installed
|
||||
folder.
|
||||
It moves the presandbox operations to the vaapi_wrapper class as the hook function
|
||||
is available there. vaInit will open driver on the correct installed folder.
|
||||
|
||||
chrome flags consolidtation into only two flags for linux. Mjpeg and
|
||||
accelerated video are used. The other flags are kept for ChromeOS and
|
||||
other OSes.
|
||||
chrome flags consolidtation into only two flags for linux. Mjpeg and accelerated
|
||||
video are used. The other flags are kept for ChromeOS and other OSes.
|
||||
|
||||
Developer testing was made on skylake hardware, ChromeOS and Ubuntu.
|
||||
|
||||
@ -28,18 +30,17 @@ 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
|
||||
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
|
||||
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
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
|
||||
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
---
|
||||
|
||||
diff --git a/AUTHORS b/AUTHORS
|
||||
index cbdb0ae..33427ba 100644
|
||||
index 79becdb..c2905ff 100644
|
||||
--- a/AUTHORS
|
||||
+++ b/AUTHORS
|
||||
@@ -158,6 +158,7 @@
|
||||
@@ -159,6 +159,7 @@
|
||||
Daniel Bevenius <daniel.bevenius@gmail.com>
|
||||
Daniel Bomar <dbdaniel42@gmail.com>
|
||||
Daniel Carvalho Liedke <dliedke@gmail.com>
|
||||
@ -48,10 +49,10 @@ index cbdb0ae..33427ba 100644
|
||||
Daniel Johnson <danielj41@gmail.com>
|
||||
Daniel Lockyer <thisisdaniellockyer@gmail.com>
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
index 7b0853f..53009dc 100644
|
||||
index 4cb4ae5..19f663c 100644
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1142,12 +1142,14 @@
|
||||
@@ -1161,12 +1161,14 @@
|
||||
flag_descriptions::kUiPartialSwapDescription, kOsAll,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
@ -66,9 +67,9 @@ index 7b0853f..53009dc 100644
|
||||
{"enable-webrtc-hw-h264-encoding",
|
||||
flag_descriptions::kWebrtcHwH264EncodingName,
|
||||
flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
|
||||
@@ -1433,6 +1435,13 @@
|
||||
flag_descriptions::kTetherDescription, kOsCrOS,
|
||||
FEATURE_VALUE_TYPE(features::kInstantTethering)},
|
||||
@@ -1474,6 +1476,13 @@
|
||||
flag_descriptions::kMultideviceDescription, kOsCrOS,
|
||||
FEATURE_VALUE_TYPE(features::kMultidevice)},
|
||||
#endif // OS_CHROMEOS
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ {
|
||||
@ -80,7 +81,7 @@ index 7b0853f..53009dc 100644
|
||||
{
|
||||
"disable-accelerated-video-decode",
|
||||
flag_descriptions::kAcceleratedVideoDecodeName,
|
||||
@@ -1440,6 +1449,7 @@
|
||||
@@ -1481,6 +1490,7 @@
|
||||
kOsMac | kOsWin | kOsCrOS | kOsAndroid,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
|
||||
},
|
||||
@ -88,17 +89,17 @@ index 7b0853f..53009dc 100644
|
||||
#if defined(OS_WIN)
|
||||
{
|
||||
"enable-hdr", flag_descriptions::kEnableHDRName,
|
||||
@@ -2093,12 +2103,17 @@
|
||||
@@ -2127,12 +2137,17 @@
|
||||
FEATURE_VALUE_TYPE(chrome::android::kWebVrAutopresent)},
|
||||
#endif // OS_ANDROID
|
||||
#endif // ENABLE_VR
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ {"enable-accelerated-mjpeg-decode",
|
||||
+ flag_descriptions::kAcceleratedMjpegDecodeName,
|
||||
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsLinux,
|
||||
+ SINGLE_VALUE_TYPE(switches::kEnableAcceleratedMjpegDecode)},
|
||||
+#else
|
||||
+#elif defined(OS_CHROMEOS)
|
||||
{"disable-accelerated-mjpeg-decode",
|
||||
flag_descriptions::kAcceleratedMjpegDecodeName,
|
||||
flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
|
||||
@ -109,10 +110,18 @@ index 7b0853f..53009dc 100644
|
||||
flag_descriptions::kV8CacheOptionsDescription, kOsAll,
|
||||
MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
|
||||
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc
|
||||
index 348bdb7..aa64bdd 100644
|
||||
index 7ac532c..0afa57b 100644
|
||||
--- a/chrome/browser/chromeos/login/chrome_restart_request.cc
|
||||
+++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
|
||||
@@ -79,8 +79,13 @@
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "base/sys_info.h"
|
||||
#include "base/timer/timer.h"
|
||||
#include "base/values.h"
|
||||
+#include "build/build_config.h"
|
||||
#include "cc/base/switches.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/chromeos/boot_times_recorder.h"
|
||||
@@ -79,8 +80,13 @@
|
||||
::switches::kDisable2dCanvasImageChromium,
|
||||
::switches::kDisableAccelerated2dCanvas,
|
||||
::switches::kDisableAcceleratedJpegDecoding,
|
||||
@ -126,7 +135,7 @@ index 348bdb7..aa64bdd 100644
|
||||
::switches::kDisableBlinkFeatures,
|
||||
::switches::kDisableCastStreamingHWEncoding,
|
||||
::switches::kDisableDistanceFieldText,
|
||||
@@ -168,7 +173,7 @@
|
||||
@@ -169,7 +175,7 @@
|
||||
::switches::kDisableWebGLImageChromium,
|
||||
::switches::kEnableWebGLImageChromium,
|
||||
::switches::kEnableWebVR,
|
||||
@ -136,28 +145,12 @@ index 348bdb7..aa64bdd 100644
|
||||
::switches::kDisableWebRtcHWEncoding,
|
||||
#endif
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
index a9789a6..f44aafa 100644
|
||||
index 100f689..4e7ca96 100644
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -518,6 +518,7 @@
|
||||
"Enabling this option allows web applications to access the WebGL "
|
||||
"Extensions that are still in draft status.";
|
||||
|
||||
+#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
|
||||
|
||||
const char kWebrtcHwDecodingDescription[] =
|
||||
@@ -527,6 +528,7 @@
|
||||
|
||||
const char kWebrtcHwEncodingDescription[] =
|
||||
"Support in WebRTC for encoding video streams using platform hardware.";
|
||||
+#endif
|
||||
|
||||
const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
|
||||
|
||||
@@ -934,6 +936,12 @@
|
||||
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
@@ -11,6 +11,13 @@
|
||||
"Enables the use of the GPU to perform 2d canvas rendering instead of "
|
||||
"using software rendering.";
|
||||
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+const char kAcceleratedVideoName[] = "Hardware-accelerated video";
|
||||
@ -165,50 +158,67 @@ index a9789a6..f44aafa 100644
|
||||
+ "Hardware-accelerated video where VA-API driver is installed on the"
|
||||
+ "system.";
|
||||
+#endif
|
||||
+
|
||||
const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
|
||||
|
||||
const char kAcceleratedVideoDecodeDescription[] =
|
||||
@@ -1496,7 +1504,7 @@
|
||||
"Hardware-accelerated video decode where available.";
|
||||
@@ -1326,6 +1333,7 @@
|
||||
const char kWebrtcEchoCanceller3Description[] =
|
||||
"Experimental WebRTC echo canceller (AEC3).";
|
||||
|
||||
+#if !defined(OS_LINUX) || !defined(OS_CHROMEOS)
|
||||
const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
|
||||
const char kWebrtcHwDecodingDescription[] =
|
||||
"Support in WebRTC for decoding video streams using platform hardware.";
|
||||
@@ -1333,6 +1341,7 @@
|
||||
const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding";
|
||||
const char kWebrtcHwEncodingDescription[] =
|
||||
"Support in WebRTC for encoding video streams using platform hardware.";
|
||||
+#endif
|
||||
|
||||
const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
|
||||
const char kWebrtcHwH264EncodingDescription[] =
|
||||
@@ -2117,7 +2126,7 @@
|
||||
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
||||
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
|
||||
const char kAcceleratedMjpegDecodeName[] =
|
||||
"Hardware-accelerated mjpeg decode for captured frame";
|
||||
@@ -1505,7 +1513,7 @@
|
||||
@@ -2126,7 +2135,7 @@
|
||||
"Enable hardware-accelerated mjpeg decode for captured frame where "
|
||||
"available.";
|
||||
|
||||
-#endif // defined(OS_CHROMEOS)
|
||||
+#endif // defined(OS_CHROMEOS) || defined(OS_LINUX)
|
||||
+#endif // defined(OS_CHROMEOS) || BUILDFLAG(USE_VAAPI)
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
||||
const char kSimplifiedFullscreenUiName[] =
|
||||
"Simplified full screen / mouse lock UI.";
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
index 8e14959..dbac6a4 100644
|
||||
index 3a99fb6..57e8c93 100644
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -31,6 +31,10 @@
|
||||
@@ -34,6 +34,10 @@
|
||||
extern const char kAccelerated2dCanvasName[];
|
||||
extern const char kAccelerated2dCanvasDescription[];
|
||||
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+extern const char kAcceleratedVideoName[];
|
||||
+extern const char kAcceleratedVideoDescription[];
|
||||
+#endif
|
||||
extern const char kAcceleratedVideoDecodeName[];
|
||||
extern const char kAcceleratedVideoDecodeDescription[];
|
||||
|
||||
@@ -1204,13 +1208,17 @@
|
||||
@@ -1251,13 +1255,17 @@
|
||||
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
-// Chrome OS ------------------------------------------------------------------
|
||||
-
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
||||
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
|
||||
extern const char kAcceleratedMjpegDecodeName[];
|
||||
extern const char kAcceleratedMjpegDecodeDescription[];
|
||||
@ -223,14 +233,14 @@ index 8e14959..dbac6a4 100644
|
||||
extern const char kAllowTouchpadThreeFingerClickDescription[];
|
||||
|
||||
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
|
||||
index 1298d75..c21c8d8 100644
|
||||
index 0461556..3dc14164 100644
|
||||
--- a/content/browser/gpu/compositor_util.cc
|
||||
+++ b/content/browser/gpu/compositor_util.cc
|
||||
@@ -105,7 +105,11 @@
|
||||
@@ -104,7 +104,11 @@
|
||||
{"video_decode",
|
||||
manager->IsFeatureBlacklisted(
|
||||
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
|
||||
+#else
|
||||
command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
|
||||
@ -238,11 +248,11 @@ index 1298d75..c21c8d8 100644
|
||||
"Accelerated video decode has been disabled, either via blacklist,"
|
||||
" about:flags or the command line.",
|
||||
true},
|
||||
@@ -113,7 +117,11 @@
|
||||
@@ -112,7 +116,11 @@
|
||||
{"video_encode",
|
||||
manager->IsFeatureBlacklisted(
|
||||
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE),
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
|
||||
+#else
|
||||
command_line.HasSwitch(switches::kDisableWebRtcHWEncoding),
|
||||
@ -251,14 +261,14 @@ index 1298d75..c21c8d8 100644
|
||||
" about:flags or the command line.",
|
||||
true},
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
index 3c7c214..27f90dd 100644
|
||||
index d1b78d7..92819ae 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -760,7 +760,11 @@
|
||||
DCHECK(command_line);
|
||||
|
||||
if (ShouldDisableAcceleratedVideoDecode(command_line))
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ command_line->AppendSwitch(switches::kEnableAcceleratedVideo);
|
||||
+#else
|
||||
command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
|
||||
@ -266,24 +276,24 @@ index 3c7c214..27f90dd 100644
|
||||
|
||||
#if defined(USE_AURA)
|
||||
if (!CanUseGpuBrowserCompositor())
|
||||
@@ -825,7 +829,11 @@
|
||||
if (gpu_preferences) {
|
||||
gpu_preferences->disable_accelerated_video_decode = true;
|
||||
} else {
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+ command_line->AppendSwitch(switches::kEnableAcceleratedVideo);
|
||||
+#else
|
||||
command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
|
||||
+#endif
|
||||
}
|
||||
@@ -818,7 +822,11 @@
|
||||
}
|
||||
|
||||
@@ -929,7 +937,12 @@
|
||||
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
|
||||
}
|
||||
|
||||
if (gpu_driver_bugs_.find(gpu::CREATE_DEFAULT_GL_CONTEXT) !=
|
||||
@@ -912,7 +920,12 @@
|
||||
const base::CommandLine* command_line =
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
if (!ShouldDisableAcceleratedVideoDecode(command_line) &&
|
||||
- !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ command_line->HasSwitch(switches::kEnableAcceleratedVideo)
|
||||
+#else
|
||||
+ !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
|
||||
@ -292,13 +302,13 @@ index 3c7c214..27f90dd 100644
|
||||
prefs->pepper_accelerated_video_decode_enabled = true;
|
||||
}
|
||||
prefs->disable_2d_canvas_copy_on_write =
|
||||
@@ -1105,7 +1118,13 @@
|
||||
@@ -1107,7 +1120,13 @@
|
||||
// to resolve crbug/442039 has been collected.
|
||||
const std::string group_name = base::FieldTrialList::FindFullName(
|
||||
"DisableAcceleratedVideoDecode");
|
||||
- if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
|
||||
+ if (
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo)
|
||||
+#else
|
||||
+ command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
|
||||
@ -308,14 +318,14 @@ index 3c7c214..27f90dd 100644
|
||||
return false;
|
||||
}
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index 40fbc05..cb63536 100644
|
||||
index 53e96f5..16379e8 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -116,7 +116,11 @@
|
||||
// Command-line switches to propagate to the GPU process.
|
||||
static const char* const kSwitchNames[] = {
|
||||
switches::kCreateDefaultGLContext,
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ switches::kEnableAcceleratedVideo,
|
||||
+#else
|
||||
switches::kDisableAcceleratedVideoDecode,
|
||||
@ -333,14 +343,14 @@ index 40fbc05..cb63536 100644
|
||||
#endif
|
||||
#if defined(OS_WIN)
|
||||
diff --git a/content/browser/renderer_host/media/video_capture_browsertest.cc b/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||
index e4c37d1..8aadccb 100644
|
||||
index e4c37d1..4634e92 100644
|
||||
--- a/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||
+++ b/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||
@@ -154,8 +154,13 @@
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
switches::kUseFakeJpegDecodeAccelerator);
|
||||
} else {
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
+ switches::kEnableAcceleratedMjpegDecode);
|
||||
+#else
|
||||
@ -351,10 +361,10 @@ index e4c37d1..8aadccb 100644
|
||||
if (params_.use_mojo_service) {
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
|
||||
diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
|
||||
index 0bf2749..ed646e6 100644
|
||||
index 6970008..89ba93d 100644
|
||||
--- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
|
||||
+++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
|
||||
@@ -54,15 +54,21 @@
|
||||
@@ -56,15 +56,21 @@
|
||||
bool is_platform_supported =
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kUseFakeJpegDecodeAccelerator);
|
||||
@ -368,7 +378,7 @@ index 0bf2749..ed646e6 100644
|
||||
#endif
|
||||
|
||||
if (!is_platform_supported ||
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
+ switches::kEnableAcceleratedMjpegDecode)
|
||||
+#else
|
||||
@ -381,10 +391,10 @@ index 0bf2749..ed646e6 100644
|
||||
RecordInitDecodeUMA_Locked();
|
||||
return;
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index fc876c6..177f713 100644
|
||||
index a750cdc..bd05641 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2104,7 +2104,11 @@
|
||||
@@ -2450,7 +2450,11 @@
|
||||
switches::kDisable2dCanvasImageChromium,
|
||||
switches::kDisable3DAPIs,
|
||||
switches::kDisableAcceleratedJpegDecoding,
|
||||
@ -396,7 +406,7 @@ index fc876c6..177f713 100644
|
||||
switches::kDisableBackgroundTimerThrottling,
|
||||
switches::kDisableBlinkFeatures,
|
||||
switches::kDisableBreakpad,
|
||||
@@ -2259,8 +2263,10 @@
|
||||
@@ -2603,8 +2607,10 @@
|
||||
switches::kEnablePepperTesting,
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
@ -408,7 +418,7 @@ index fc876c6..177f713 100644
|
||||
switches::kEnableWebRtcStunOrigin,
|
||||
switches::kEnforceWebRtcIPPermissionCheck,
|
||||
diff --git a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
|
||||
index 7b9ec99..67cd975 100644
|
||||
index 3d815a2..2c96048 100644
|
||||
--- a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
|
||||
+++ b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
|
||||
@@ -58,7 +58,12 @@
|
||||
@ -426,7 +436,7 @@ index 7b9ec99..67cd975 100644
|
||||
|
||||
private:
|
||||
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
|
||||
index 9ae6231..060df98 100644
|
||||
index fe2f298a..507f481 100644
|
||||
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
|
||||
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
|
||||
@@ -56,22 +56,6 @@
|
||||
@ -478,7 +488,7 @@ index 9ae6231..060df98 100644
|
||||
}
|
||||
|
||||
intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args,
|
||||
@@ -303,33 +280,6 @@
|
||||
@@ -296,33 +273,6 @@
|
||||
GpuBrokerProcessPolicy::Create,
|
||||
std::vector<BrokerFilePermission>()); // No extra files in whitelist.
|
||||
|
||||
@ -513,45 +523,61 @@ index 9ae6231..060df98 100644
|
||||
}
|
||||
|
||||
diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
|
||||
index 7724934..790ba57 100644
|
||||
index a5424bb..b68b802 100644
|
||||
--- a/content/gpu/BUILD.gn
|
||||
+++ b/content/gpu/BUILD.gn
|
||||
@@ -102,7 +102,7 @@
|
||||
]
|
||||
}
|
||||
@@ -45,7 +45,6 @@
|
||||
]
|
||||
|
||||
- if (is_chromeos && current_cpu != "arm") {
|
||||
+ if ((is_chromeos || is_desktop_linux) && current_cpu != "arm") {
|
||||
configs += [ "//third_party/libva:libva_config" ]
|
||||
configs += [ "//content:content_implementation" ]
|
||||
-
|
||||
deps = [
|
||||
"//base",
|
||||
"//base/third_party/dynamic_annotations",
|
||||
@@ -114,4 +113,8 @@
|
||||
if (enable_vulkan) {
|
||||
deps += [ "//gpu/vulkan" ]
|
||||
}
|
||||
|
||||
+
|
||||
+ if (is_desktop_linux) {
|
||||
+ public_configs = [ "//media/gpu:libva_config" ]
|
||||
+ }
|
||||
}
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 3bf34b9..6b40e28 100644
|
||||
index 4b87a8c..1bbf7c8 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -83,7 +83,7 @@
|
||||
#include "ui/ozone/public/ozone_platform.h"
|
||||
@@ -246,7 +246,7 @@
|
||||
// Initializes StatisticsRecorder which tracks UMA histograms.
|
||||
base::StatisticsRecorder::Initialize();
|
||||
|
||||
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX)
|
||||
// Set thread priority before sandbox initialization.
|
||||
base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
|
||||
#endif
|
||||
@@ -274,7 +274,7 @@
|
||||
GetContentClient()->SetGpuInfo(gpu_init.gpu_info());
|
||||
|
||||
base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
|
||||
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX)
|
||||
io_thread_priority = base::ThreadPriority::DISPLAY;
|
||||
#endif
|
||||
|
||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
||||
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
|
||||
#include "media/gpu/vaapi_wrapper.h"
|
||||
#endif
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
(void)base::RandUint64();
|
||||
}
|
||||
|
||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
||||
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
|
||||
media::VaapiWrapper::PreSandboxInitialization();
|
||||
#endif
|
||||
#if defined(OS_WIN)
|
||||
diff --git a/content/public/browser/gpu_utils.cc b/content/public/browser/gpu_utils.cc
|
||||
index a4145ba..1300727 100644
|
||||
index a4145ba..e9ff010 100644
|
||||
--- a/content/public/browser/gpu_utils.cc
|
||||
+++ b/content/public/browser/gpu_utils.cc
|
||||
@@ -56,12 +56,19 @@
|
||||
@@ -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"
|
||||
@@ -56,12 +57,19 @@
|
||||
gpu_preferences.ui_prioritize_in_gpu_process =
|
||||
command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess);
|
||||
gpu_preferences.disable_accelerated_video_decode =
|
||||
@ -574,7 +600,7 @@ index a4145ba..1300727 100644
|
||||
command_line->HasSwitch(switches::kDisableWebRtcHWEncoding);
|
||||
#endif
|
||||
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
|
||||
index 6cfff13..5e70009 100644
|
||||
index d7101f4..d81b381 100644
|
||||
--- a/content/public/common/content_switches.cc
|
||||
+++ b/content/public/common/content_switches.cc
|
||||
@@ -85,12 +85,21 @@
|
||||
@ -600,7 +626,7 @@ index 6cfff13..5e70009 100644
|
||||
// Disables hardware acceleration of video decode, where available.
|
||||
const char kDisableAcceleratedVideoDecode[] =
|
||||
"disable-accelerated-video-decode";
|
||||
@@ -909,11 +918,13 @@
|
||||
@@ -915,11 +924,13 @@
|
||||
// ignores this switch on its stable and beta channels.
|
||||
const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
|
||||
|
||||
@ -615,7 +641,7 @@ index 6cfff13..5e70009 100644
|
||||
// Enables negotiation of GCM cipher suites from RFC 7714 for SRTP in WebRTC.
|
||||
// See https://tools.ietf.org/html/rfc7714 for further information.
|
||||
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
|
||||
index c56895a..83d70b3 100644
|
||||
index 0227769..6d72feb 100644
|
||||
--- a/content/public/common/content_switches.h
|
||||
+++ b/content/public/common/content_switches.h
|
||||
@@ -34,7 +34,11 @@
|
||||
@ -631,16 +657,16 @@ index c56895a..83d70b3 100644
|
||||
CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
|
||||
extern const char kDisableBackingStoreLimit[];
|
||||
@@ -107,6 +111,9 @@
|
||||
CONTENT_EXPORT extern const char kDisableZeroCopyDxgiVideo[];
|
||||
CONTENT_EXPORT extern const char kDomAutomationController[];
|
||||
extern const char kDisable2dCanvasClipAntialiasing[];
|
||||
CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[];
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+CONTENT_EXPORT extern const char kEnableAcceleratedVideo[];
|
||||
+#endif
|
||||
CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
|
||||
CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
|
||||
CONTENT_EXPORT extern const char kEnableBlinkFeatures[];
|
||||
@@ -261,8 +268,10 @@
|
||||
@@ -257,8 +264,10 @@
|
||||
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
|
||||
@ -652,10 +678,10 @@ index c56895a..83d70b3 100644
|
||||
CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
|
||||
CONTENT_EXPORT extern const char kEnforceWebRtcIPPermissionCheck[];
|
||||
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||
index 963de65..e61aeb3 100644
|
||||
index 38fa749..7f7bf18 100644
|
||||
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||
@@ -239,10 +239,19 @@
|
||||
@@ -240,10 +240,19 @@
|
||||
|
||||
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
|
||||
if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
|
||||
@ -677,10 +703,10 @@ index 963de65..e61aeb3 100644
|
||||
}
|
||||
}
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index 3c12a32..c0d44d8 100644
|
||||
index 763f2fe..603660f 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1437,7 +1437,11 @@
|
||||
@@ -1443,7 +1443,11 @@
|
||||
scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
|
||||
GetMediaThreadTaskRunner();
|
||||
const bool enable_video_accelerator =
|
||||
@ -706,7 +732,7 @@ index 8dd0ff1..d6e5c59 100644
|
||||
bool disable_vaapi_accelerated_video_encode = false;
|
||||
#endif
|
||||
diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
|
||||
index 006cc6d..2dcde7d 100644
|
||||
index ed5c6d6..4c45159 100644
|
||||
--- a/gpu/config/software_rendering_list.json
|
||||
+++ b/gpu/config/software_rendering_list.json
|
||||
@@ -371,17 +371,6 @@
|
||||
@ -727,51 +753,58 @@ index 006cc6d..2dcde7d 100644
|
||||
"id": 50,
|
||||
"description": "Disable VMware software renderer on older Mesa",
|
||||
"cr_bugs": [145531, 332596, 571899, 629434],
|
||||
diff --git a/media/BUILD.gn b/media/BUILD.gn
|
||||
index aae61e0..6c87577 100644
|
||||
--- a/media/BUILD.gn
|
||||
+++ b/media/BUILD.gn
|
||||
@@ -354,7 +354,7 @@
|
||||
diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn
|
||||
index e8ff812..18735d2 100644
|
||||
--- a/media/filters/BUILD.gn
|
||||
+++ b/media/filters/BUILD.gn
|
||||
@@ -195,7 +195,7 @@
|
||||
]
|
||||
}
|
||||
|
||||
- if (current_cpu != "arm" && is_chromeos) {
|
||||
+ if (current_cpu != "arm" && (is_chromeos || is_desktop_linux)) {
|
||||
sources += [
|
||||
"filters/h264_bitstream_buffer.cc",
|
||||
"filters/h264_bitstream_buffer.h",
|
||||
"h264_bitstream_buffer.cc",
|
||||
"h264_bitstream_buffer.h",
|
||||
diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn
|
||||
index 1b58a14..0fb6a5f 100644
|
||||
index 3a65c75..dd2d957 100644
|
||||
--- a/media/gpu/BUILD.gn
|
||||
+++ b/media/gpu/BUILD.gn
|
||||
@@ -18,7 +18,7 @@
|
||||
@@ -25,6 +25,14 @@
|
||||
import("//build/config/mac/mac_sdk.gni")
|
||||
}
|
||||
|
||||
-if (is_chromeos && current_cpu != "arm") {
|
||||
+if ((is_chromeos || is_desktop_linux) && current_cpu != "arm") {
|
||||
+if (is_desktop_linux && use_vaapi) {
|
||||
+ import("//build/config/linux/pkg_config.gni")
|
||||
+
|
||||
+ pkg_config("libva_config") {
|
||||
+ packages = [ "libva" ]
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
if (use_vaapi) {
|
||||
action("libva_generate_stubs") {
|
||||
extra_header = "va_stub_header.fragment"
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
@@ -258,7 +266,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (is_chromeos || is_win) {
|
||||
+ if (is_chromeos || is_win || is_desktop_linux) {
|
||||
sources += [
|
||||
"accelerated_video_decoder.h",
|
||||
"h264_decoder.cc",
|
||||
@@ -243,7 +243,7 @@
|
||||
"h264_dpb.h",
|
||||
]
|
||||
}
|
||||
- if (is_chromeos) {
|
||||
+ if (is_chromeos || is_desktop_linux) {
|
||||
sources += [
|
||||
"vp8_decoder.cc",
|
||||
"vp8_decoder.h",
|
||||
@@ -374,7 +374,7 @@
|
||||
@@ -341,6 +349,9 @@
|
||||
"vaapi_drm_picture.h",
|
||||
]
|
||||
}
|
||||
+ if (is_desktop_linux) {
|
||||
+ public_configs = [ ":libva_config" ]
|
||||
+ }
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
@@ -387,7 +398,7 @@
|
||||
}
|
||||
|
||||
# TODO(watk): Run this on bots. http://crbug.com/461437
|
||||
@ -780,7 +813,7 @@ index 1b58a14..0fb6a5f 100644
|
||||
test("video_decode_accelerator_unittest") {
|
||||
sources = [
|
||||
"video_accelerator_unittest_helpers.h",
|
||||
@@ -484,7 +484,7 @@
|
||||
@@ -500,7 +511,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -789,7 +822,7 @@ index 1b58a14..0fb6a5f 100644
|
||||
test("video_encode_accelerator_unittest") {
|
||||
deps = [
|
||||
"//base",
|
||||
@@ -517,7 +517,7 @@
|
||||
@@ -532,7 +543,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -799,10 +832,10 @@ index 1b58a14..0fb6a5f 100644
|
||||
deps = [
|
||||
"//base",
|
||||
diff --git a/media/gpu/gpu_video_decode_accelerator_factory.cc b/media/gpu/gpu_video_decode_accelerator_factory.cc
|
||||
index e926ad6..0dab418 100644
|
||||
index b440d26..1558796 100644
|
||||
--- a/media/gpu/gpu_video_decode_accelerator_factory.cc
|
||||
+++ b/media/gpu/gpu_video_decode_accelerator_factory.cc
|
||||
@@ -16,7 +16,7 @@
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "media/gpu/dxva_video_decode_accelerator_win.h"
|
||||
#elif defined(OS_MACOSX)
|
||||
#include "media/gpu/vt_video_decode_accelerator_mac.h"
|
||||
@ -811,7 +844,7 @@ index e926ad6..0dab418 100644
|
||||
#if defined(USE_V4L2_CODEC)
|
||||
#include "media/gpu/v4l2_device.h"
|
||||
#include "media/gpu/v4l2_slice_video_decode_accelerator.h"
|
||||
@@ -82,11 +82,12 @@
|
||||
@@ -85,6 +85,7 @@
|
||||
// profile (instead of calculating a superset).
|
||||
// TODO(posciak,henryhsu): improve this so that we choose a superset of
|
||||
// resolutions and other supported profile parameters.
|
||||
@ -819,49 +852,12 @@ index e926ad6..0dab418 100644
|
||||
#if defined(OS_WIN)
|
||||
capabilities.supported_profiles =
|
||||
DXVAVideoDecodeAccelerator::GetSupportedProfiles(gpu_preferences,
|
||||
workarounds);
|
||||
-#elif defined(OS_CHROMEOS)
|
||||
+#elif defined(OS_CHROMEOS) || defined(OS_LINUX)
|
||||
VideoDecodeAccelerator::SupportedProfiles vda_profiles;
|
||||
#if defined(USE_V4L2_CODEC)
|
||||
vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles();
|
||||
@@ -139,7 +140,7 @@
|
||||
&GpuVideoDecodeAcceleratorFactory::CreateV4L2VDA,
|
||||
&GpuVideoDecodeAcceleratorFactory::CreateV4L2SVDA,
|
||||
#endif
|
||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
||||
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
|
||||
&GpuVideoDecodeAcceleratorFactory::CreateVaapiVDA,
|
||||
#endif
|
||||
#if defined(OS_MACOSX)
|
||||
@@ -220,7 +221,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
||||
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
|
||||
std::unique_ptr<VideoDecodeAccelerator>
|
||||
GpuVideoDecodeAcceleratorFactory::CreateVaapiVDA(
|
||||
const gpu::GpuDriverBugWorkarounds& workarounds,
|
||||
diff --git a/media/gpu/gpu_video_decode_accelerator_factory.h b/media/gpu/gpu_video_decode_accelerator_factory.h
|
||||
index d54230c..19e9a36 100644
|
||||
--- a/media/gpu/gpu_video_decode_accelerator_factory.h
|
||||
+++ b/media/gpu/gpu_video_decode_accelerator_factory.h
|
||||
@@ -105,7 +105,7 @@
|
||||
const gpu::GpuDriverBugWorkarounds& workarounds,
|
||||
const gpu::GpuPreferences& gpu_preferences) const;
|
||||
#endif
|
||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
||||
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
|
||||
std::unique_ptr<VideoDecodeAccelerator> CreateVaapiVDA(
|
||||
const gpu::GpuDriverBugWorkarounds& workarounds,
|
||||
const gpu::GpuPreferences& gpu_preferences) const;
|
||||
diff --git a/media/gpu/gpu_video_encode_accelerator_factory.cc b/media/gpu/gpu_video_encode_accelerator_factory.cc
|
||||
index 873b64a..9ebcd14 100644
|
||||
index d1b8ff3..c3f1f03 100644
|
||||
--- a/media/gpu/gpu_video_encode_accelerator_factory.cc
|
||||
+++ b/media/gpu/gpu_video_encode_accelerator_factory.cc
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "base/memory/ptr_util.h"
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "media/gpu/features.h"
|
||||
#include "media/gpu/gpu_video_accelerator_util.h"
|
||||
|
||||
-#if defined(OS_CHROMEOS)
|
||||
@ -869,64 +865,11 @@ index 873b64a..9ebcd14 100644
|
||||
#if defined(USE_V4L2_CODEC)
|
||||
#include "media/gpu/v4l2_video_encode_accelerator.h"
|
||||
#endif
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
||||
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
|
||||
std::unique_ptr<VideoEncodeAccelerator> CreateVaapiVEA() {
|
||||
return base::WrapUnique<VideoEncodeAccelerator>(
|
||||
new VaapiVideoEncodeAccelerator());
|
||||
@@ -76,7 +76,7 @@
|
||||
#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
|
||||
vea_factory_functions.push_back(&CreateV4L2VEA);
|
||||
#endif
|
||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
||||
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
|
||||
if (!gpu_preferences.disable_vaapi_accelerated_video_encode)
|
||||
vea_factory_functions.push_back(&CreateVaapiVEA);
|
||||
#endif
|
||||
diff --git a/media/gpu/ipc/service/BUILD.gn b/media/gpu/ipc/service/BUILD.gn
|
||||
index 776b2e3..8e95f1b 100644
|
||||
--- a/media/gpu/ipc/service/BUILD.gn
|
||||
+++ b/media/gpu/ipc/service/BUILD.gn
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
configs += [ "//media/gpu:gpu_config" ]
|
||||
|
||||
- if (is_chromeos && current_cpu != "arm") {
|
||||
+ if ((is_chromeos || is_desktop_linux) && current_cpu != "arm") {
|
||||
configs += [ "//third_party/libva:libva_config" ]
|
||||
}
|
||||
|
||||
diff --git a/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc b/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc
|
||||
index d1a64d7..0184644 100644
|
||||
--- a/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc
|
||||
+++ b/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "media/gpu/ipc/common/media_messages.h"
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
||||
#if defined(ARCH_CPU_X86_FAMILY)
|
||||
#include "media/gpu/vaapi_jpeg_decode_accelerator.h"
|
||||
#endif
|
||||
@@ -57,7 +57,7 @@
|
||||
std::unique_ptr<media::JpegDecodeAccelerator> CreateVaapiJDA(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) {
|
||||
std::unique_ptr<media::JpegDecodeAccelerator> decoder;
|
||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
||||
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
|
||||
decoder.reset(
|
||||
new media::VaapiJpegDecodeAccelerator(std::move(io_task_runner)));
|
||||
#endif
|
||||
diff --git a/media/gpu/vaapi_wrapper.cc b/media/gpu/vaapi_wrapper.cc
|
||||
index 5146f43..a1c8a1e 100644
|
||||
index 0739e56..b059fd4 100644
|
||||
--- a/media/gpu/vaapi_wrapper.cc
|
||||
+++ b/media/gpu/vaapi_wrapper.cc
|
||||
@@ -1132,6 +1132,7 @@
|
||||
@@ -1110,6 +1110,7 @@
|
||||
if (drm_file.IsValid())
|
||||
GetDisplayState()->SetDrmFd(drm_file.GetPlatformFile());
|
||||
#endif
|
||||
@ -934,3 +877,33 @@ index 5146f43..a1c8a1e 100644
|
||||
}
|
||||
|
||||
// static
|
||||
diff --git a/services/ui/gpu/gpu_main.cc b/services/ui/gpu/gpu_main.cc
|
||||
index f1b8567..15cf123 100644
|
||||
--- a/services/ui/gpu/gpu_main.cc
|
||||
+++ b/services/ui/gpu/gpu_main.cc
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "base/power_monitor/power_monitor_device_source.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/threading/sequenced_task_runner_handle.h"
|
||||
+#include "build/build_config.h"
|
||||
#include "components/viz/service/display_embedder/gpu_display_provider.h"
|
||||
#include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
|
||||
#include "gpu/command_buffer/common/activity_flags.h"
|
||||
@@ -79,7 +80,7 @@
|
||||
thread_options.message_loop_type = base::MessageLoop::TYPE_IO;
|
||||
#endif
|
||||
|
||||
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX)
|
||||
thread_options.priority = base::ThreadPriority::DISPLAY;
|
||||
#endif
|
||||
CHECK(gpu_thread_.StartWithOptions(thread_options));
|
||||
@@ -89,7 +90,7 @@
|
||||
// should be possible to use |main_task_runner_| for doing IO tasks.
|
||||
thread_options = base::Thread::Options(base::MessageLoop::TYPE_IO, 0);
|
||||
thread_options.priority = base::ThreadPriority::NORMAL;
|
||||
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX)
|
||||
// TODO(reveman): Remove this in favor of setting it explicitly for each type
|
||||
// of process.
|
||||
thread_options.priority = base::ThreadPriority::DISPLAY;
|
@ -1,10 +1,27 @@
|
||||
--- a/tools/gn/bootstrap/bootstrap.py 2017-08-10 21:13:27.316180673 +0200
|
||||
+++ b/tools/gn/bootstrap/bootstrap.py 2017-08-10 21:13:23.544160535 +0200
|
||||
@@ -486,6 +486,7 @@
|
||||
'base/synchronization/lock.cc',
|
||||
'base/sys_info.cc',
|
||||
'base/task_runner.cc',
|
||||
+ 'base/task_scheduler/environment_config.cc',
|
||||
'base/task_scheduler/delayed_task_manager.cc',
|
||||
'base/task_scheduler/post_task.cc',
|
||||
'base/task_scheduler/priority_queue.cc',
|
||||
commit 96c271f8ab2be7ea4199078ea65ac50c6ada4685
|
||||
Author: Pawel Hajdan, Jr <phajdan.jr@chromium.org>
|
||||
Date: Wed Jul 26 21:51:54 2017 +0000
|
||||
|
||||
wip
|
||||
|
||||
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
|
||||
index 1390560f8e37..ff2ae57c46b0 100755
|
||||
--- a/tools/gn/bootstrap/bootstrap.py
|
||||
+++ b/tools/gn/bootstrap/bootstrap.py
|
||||
@@ -449,6 +449,7 @@ def write_gn_ninja(path, root_gen_dir, options):
|
||||
'base/metrics/histogram_base.cc',
|
||||
'base/metrics/histogram_functions.cc',
|
||||
'base/metrics/histogram_samples.cc',
|
||||
+ 'base/metrics/histogram_snapshot_manager.cc',
|
||||
'base/metrics/metrics_hashes.cc',
|
||||
'base/metrics/persistent_histogram_allocator.cc',
|
||||
'base/metrics/persistent_memory_allocator.cc',
|
||||
@@ -534,7 +535,7 @@ def write_gn_ninja(path, root_gen_dir, options):
|
||||
'base/trace_event/heap_profiler_allocation_context_tracker.cc',
|
||||
'base/trace_event/heap_profiler_allocation_register.cc',
|
||||
'base/trace_event/heap_profiler_event_filter.cc',
|
||||
- 'base/trace_event/heap_profiler_event_writer.cc',
|
||||
+ 'base/trace_event/heap_profiler_heap_dump_writer.cc',
|
||||
'base/trace_event/heap_profiler_serialization_state.cc',
|
||||
'base/trace_event/heap_profiler_stack_frame_deduplicator.cc',
|
||||
'base/trace_event/heap_profiler_type_name_deduplicator.cc',
|
||||
|
@ -0,0 +1,14 @@
|
||||
diff --git a/base/numerics/safe_math_shared_impl.h b/base/numerics/safe_math_shared_impl.h
|
||||
index 99f230ce7e9a..de2415d402f5 100644
|
||||
--- a/base/numerics/safe_math_shared_impl.h
|
||||
+++ b/base/numerics/safe_math_shared_impl.h
|
||||
@@ -21,8 +21,7 @@
|
||||
#if !defined(__native_client__) && \
|
||||
((defined(__clang__) && \
|
||||
((__clang_major__ > 3) || \
|
||||
- (__clang_major__ == 3 && __clang_minor__ >= 4))) || \
|
||||
- (defined(__GNUC__) && __GNUC__ >= 5))
|
||||
+ (__clang_major__ == 3 && __clang_minor__ >= 4))))
|
||||
#include "base/numerics/safe_math_clang_gcc_impl.h"
|
||||
#define BASE_HAS_OPTIMIZED_SAFE_MATH (1)
|
||||
#else
|
@ -1,74 +0,0 @@
|
||||
Source: https://aur.archlinux.org/packages/chromium-vaapi/
|
||||
diff -upr chromium-59.0.3071.86.orig/v8/src/objects/hash-table.h chromium-59.0.3071.86/v8/src/objects/hash-table.h
|
||||
--- chromium-59.0.3071.86.orig/v8/src/objects/hash-table.h 2017-06-05 22:04:29.000000000 +0300
|
||||
+++ chromium-59.0.3071.86/v8/src/objects/hash-table.h 2017-06-06 14:35:41.558245559 +0300
|
||||
@@ -135,22 +135,10 @@ class HashTable : public HashTableBase {
|
||||
public:
|
||||
typedef Shape ShapeT;
|
||||
|
||||
- // Wrapper methods
|
||||
- inline uint32_t Hash(Key key) {
|
||||
- if (Shape::UsesSeed) {
|
||||
- return Shape::SeededHash(key, GetHeap()->HashSeed());
|
||||
- } else {
|
||||
- return Shape::Hash(key);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- inline uint32_t HashForObject(Key key, Object* object) {
|
||||
- if (Shape::UsesSeed) {
|
||||
- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
|
||||
- } else {
|
||||
- return Shape::HashForObject(key, object);
|
||||
- }
|
||||
- }
|
||||
+ // Wrapper methods. Defined in src/objects-inl.h
|
||||
+ // to break a cycle with src/heap/heap.h.
|
||||
+ inline uint32_t Hash(Key key);
|
||||
+ inline uint32_t HashForObject(Key key, Object* object);
|
||||
|
||||
// Returns a new HashTable object.
|
||||
MUST_USE_RESULT static Handle<Derived> New(
|
||||
diff -upr chromium-59.0.3071.86.orig/v8/src/objects-body-descriptors.h chromium-59.0.3071.86/v8/src/objects-body-descriptors.h
|
||||
--- chromium-59.0.3071.86.orig/v8/src/objects-body-descriptors.h 2017-06-05 22:04:29.000000000 +0300
|
||||
+++ chromium-59.0.3071.86/v8/src/objects-body-descriptors.h 2017-06-06 14:35:41.554912132 +0300
|
||||
@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public
|
||||
|
||||
template <typename StaticVisitor>
|
||||
static inline void IterateBody(HeapObject* obj, int object_size) {
|
||||
- IterateBody(obj);
|
||||
+ IterateBody<StaticVisitor>(obj);
|
||||
}
|
||||
};
|
||||
|
||||
diff -upr chromium-59.0.3071.86.orig/v8/src/objects-inl.h chromium-59.0.3071.86/v8/src/objects-inl.h
|
||||
--- chromium-59.0.3071.86.orig/v8/src/objects-inl.h 2017-06-05 22:04:29.000000000 +0300
|
||||
+++ chromium-59.0.3071.86/v8/src/objects-inl.h 2017-06-06 14:35:41.558245559 +0300
|
||||
@@ -46,6 +46,27 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
+template <typename Derived, typename Shape, typename Key>
|
||||
+uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) {
|
||||
+ if (Shape::UsesSeed) {
|
||||
+ return Shape::SeededHash(key, GetHeap()->HashSeed());
|
||||
+ } else {
|
||||
+ return Shape::Hash(key);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
+template <typename Derived, typename Shape, typename Key>
|
||||
+uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key,
|
||||
+ Object* object) {
|
||||
+ if (Shape::UsesSeed) {
|
||||
+ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
|
||||
+ } else {
|
||||
+ return Shape::HashForObject(key, object);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
PropertyDetails::PropertyDetails(Smi* smi) {
|
||||
value_ = smi->value();
|
||||
}
|
@ -1,10 +1,7 @@
|
||||
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.cc b/chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
index cef1ef0..7df1d0c 100644
|
||||
--- a/chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
+++ b/chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
|
||||
@@ -315,15 +315,52 @@
|
||||
return params;
|
||||
--- a/chrome/browser/ui/libgtkui/gtk_ui.cc 2017-09-07 23:15:07.376937045 +0200
|
||||
+++ b/chrome/browser/ui/libgtkui/gtk_ui.cc 2017-09-07 23:16:15.281262029 +0200
|
||||
@@ -1048,18 +1048,52 @@
|
||||
native_theme_->NotifyObservers();
|
||||
}
|
||||
|
||||
+float GtkDpiToScaleFactor(int dpi) {
|
||||
@ -40,15 +37,18 @@ index cef1ef0..7df1d0c 100644
|
||||
+ return GtkDpiToScaleFactor(gtk_dpi);
|
||||
+}
|
||||
+
|
||||
float GetRawDeviceScaleFactor() {
|
||||
float GtkUi::GetRawDeviceScaleFactor() {
|
||||
if (display::Display::HasForceDeviceScaleFactor())
|
||||
return display::Display::GetForcedDeviceScaleFactor();
|
||||
|
||||
- GdkScreen* screen = gdk_screen_get_default();
|
||||
- gint scale = gdk_screen_get_monitor_scale_factor(
|
||||
- screen, gdk_screen_get_primary_monitor(screen));
|
||||
- gint scale = gtk_widget_get_scale_factor(fake_window_);
|
||||
- gdouble resolution = gdk_screen_get_resolution(screen);
|
||||
- return resolution <= 0 ? scale : resolution * scale / kDefaultDPI;
|
||||
- const float scale_factor =
|
||||
- resolution <= 0 ? scale : resolution * scale / kDefaultDPI;
|
||||
- // Blacklist scaling factors <120% (crbug.com/484400) and round
|
||||
- // to 1 decimal to prevent rendering problems (crbug.com/485183).
|
||||
- return scale_factor < 1.2f ? 1.0f : roundf(scale_factor * 10) / 10;
|
||||
+ float scale = GetScaleFromGdkScreenSettings();
|
||||
+ if (scale > 0)
|
||||
+ return scale;
|
||||
@ -60,4 +60,4 @@ index cef1ef0..7df1d0c 100644
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
views::LinuxUI::NonClientMiddleClickAction GetDefaultMiddleClickAction() {
|
||||
void GtkUi::UpdateDeviceScaleFactor() {
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- a/content/browser/accessibility/browser_accessibility_auralinux.cc.orig 2017-07-27 06:28:01.090257874 +0000
|
||||
+++ b/content/browser/accessibility/browser_accessibility_auralinux.cc 2017-07-27 06:28:21.174653680 +0000
|
||||
@@ -571,7 +571,7 @@
|
||||
// it's best to leave this out rather than break people's builds:
|
||||
#if defined(ATK_CHECK_VERSION)
|
||||
#if ATK_CHECK_VERSION(2, 16, 0)
|
||||
- atk_state_set_add_state(atk_state_set, ATK_STATE_READ_ONLY);
|
||||
+ atk_state_set_add_state(state_set, ATK_STATE_READ_ONLY);
|
||||
#endif
|
||||
#endif
|
||||
break;
|
Loading…
x
Reference in New Issue
Block a user