chromium: update to 61.0.3163.79

This commit is contained in:
Sascha Kuehndel (InuSasha) 2017-12-14 16:48:20 +01:00
parent 803da36ae8
commit 165dd91730
No known key found for this signature in database
GPG Key ID: 15FED89617B88D1B
8 changed files with 12098 additions and 352 deletions

View File

@ -19,15 +19,15 @@
################################################################################ ################################################################################
PKG_NAME="chromium" PKG_NAME="chromium"
PKG_VERSION="60.0.3112.113" PKG_VERSION="61.0.3163.79"
PKG_SHA256="ebfce706a1ea02a92e35f360c7364d1184dacf040b59eade4cb51aa61a4fec59" PKG_SHA256="bdbc139ed86f3b5d1ec3c3b00caeaef4f9ac2c363438f03dded56e217ad10727"
PKG_REV="107" PKG_REV="108"
PKG_ARCH="x86_64" PKG_ARCH="x86_64"
PKG_LICENSE="Mixed" PKG_LICENSE="Mixed"
PKG_SITE="http://www.chromium.org/Home" PKG_SITE="http://www.chromium.org/Home"
PKG_URL="https://commondatastorage.googleapis.com/chromium-browser-official/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="https://commondatastorage.googleapis.com/chromium-browser-official/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_HOST="toolchain" PKG_DEPENDS_HOST="toolchain ninja:host"
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_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_SECTION="browser"
PKG_SHORTDESC="Chromium Browser: the open-source web browser from Google" PKG_SHORTDESC="Chromium Browser: the open-source web browser from Google"
PKG_LONGDESC="Chromium Browser ($PKG_VERSION): 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' 'linux_use_bundled_binutils=false'
'use_allocator="none"' 'use_allocator="none"'
'use_cups=false' 'use_cups=false'
'use_custom_libcxx=false'
'use_gconf=false' 'use_gconf=false'
'use_gnome_keyring=false' 'use_gnome_keyring=false'
'use_gold=false' 'use_gold=false'
@ -93,6 +94,7 @@ make_target() {
'use_pulseaudio=false' 'use_pulseaudio=false'
'use_sysroot=true' 'use_sysroot=true'
'use_vulcanize=false' 'use_vulcanize=false'
'use_vaapi=true'
"target_sysroot=\"${SYSROOT_PREFIX}\"" "target_sysroot=\"${SYSROOT_PREFIX}\""
'enable_hangout_services_extension=true' 'enable_hangout_services_extension=true'
'enable_widevine=true' 'enable_widevine=true'

File diff suppressed because it is too large Load Diff

View File

@ -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> 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 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 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 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 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. 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 It moves the presandbox operations to the vaapi_wrapper class as the hook function
function is available there. vaInit will open driver on the correct installed is available there. vaInit will open driver on the correct installed folder.
folder.
chrome flags consolidtation into only two flags for linux. Mjpeg and chrome flags consolidtation into only two flags for linux. Mjpeg and accelerated
accelerated video are used. The other flags are kept for ChromeOS and video are used. The other flags are kept for ChromeOS and other OSes.
other OSes.
Developer testing was made on skylake hardware, ChromeOS and Ubuntu. 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" TEST="repeat on different hardware families"
R=posciak@chromium.org R=posciak@chromium.org
R=kcwu@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 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 Change-Id: Ifbbf5c9e5221a8b5733fc6d4d0cf984a1f103171
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
--- ---
diff --git a/AUTHORS b/AUTHORS diff --git a/AUTHORS b/AUTHORS
index cbdb0ae..33427ba 100644 index 79becdb..c2905ff 100644
--- a/AUTHORS --- a/AUTHORS
+++ b/AUTHORS +++ b/AUTHORS
@@ -158,6 +158,7 @@ @@ -159,6 +159,7 @@
Daniel Bevenius <daniel.bevenius@gmail.com> Daniel Bevenius <daniel.bevenius@gmail.com>
Daniel Bomar <dbdaniel42@gmail.com> Daniel Bomar <dbdaniel42@gmail.com>
Daniel Carvalho Liedke <dliedke@gmail.com> Daniel Carvalho Liedke <dliedke@gmail.com>
@ -48,10 +49,10 @@ index cbdb0ae..33427ba 100644
Daniel Johnson <danielj41@gmail.com> Daniel Johnson <danielj41@gmail.com>
Daniel Lockyer <thisisdaniellockyer@gmail.com> Daniel Lockyer <thisisdaniellockyer@gmail.com>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc 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 --- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -1142,12 +1142,14 @@ @@ -1161,12 +1161,14 @@
flag_descriptions::kUiPartialSwapDescription, kOsAll, flag_descriptions::kUiPartialSwapDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)}, SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
#if BUILDFLAG(ENABLE_WEBRTC) #if BUILDFLAG(ENABLE_WEBRTC)
@ -66,9 +67,9 @@ index 7b0853f..53009dc 100644
{"enable-webrtc-hw-h264-encoding", {"enable-webrtc-hw-h264-encoding",
flag_descriptions::kWebrtcHwH264EncodingName, flag_descriptions::kWebrtcHwH264EncodingName,
flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS, flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
@@ -1433,6 +1435,13 @@ @@ -1474,6 +1476,13 @@
flag_descriptions::kTetherDescription, kOsCrOS, flag_descriptions::kMultideviceDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kInstantTethering)}, FEATURE_VALUE_TYPE(features::kMultidevice)},
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
+ { + {
@ -80,7 +81,7 @@ index 7b0853f..53009dc 100644
{ {
"disable-accelerated-video-decode", "disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName, flag_descriptions::kAcceleratedVideoDecodeName,
@@ -1440,6 +1449,7 @@ @@ -1481,6 +1490,7 @@
kOsMac | kOsWin | kOsCrOS | kOsAndroid, kOsMac | kOsWin | kOsCrOS | kOsAndroid,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
}, },
@ -88,17 +89,17 @@ index 7b0853f..53009dc 100644
#if defined(OS_WIN) #if defined(OS_WIN)
{ {
"enable-hdr", flag_descriptions::kEnableHDRName, "enable-hdr", flag_descriptions::kEnableHDRName,
@@ -2093,12 +2103,17 @@ @@ -2127,12 +2137,17 @@
FEATURE_VALUE_TYPE(chrome::android::kWebVrAutopresent)}, FEATURE_VALUE_TYPE(chrome::android::kWebVrAutopresent)},
#endif // OS_ANDROID #endif // OS_ANDROID
#endif // ENABLE_VR #endif // ENABLE_VR
-#if defined(OS_CHROMEOS) -#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", + {"enable-accelerated-mjpeg-decode",
+ flag_descriptions::kAcceleratedMjpegDecodeName, + flag_descriptions::kAcceleratedMjpegDecodeName,
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsLinux, + flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsLinux,
+ SINGLE_VALUE_TYPE(switches::kEnableAcceleratedMjpegDecode)}, + SINGLE_VALUE_TYPE(switches::kEnableAcceleratedMjpegDecode)},
+#else +#elif defined(OS_CHROMEOS)
{"disable-accelerated-mjpeg-decode", {"disable-accelerated-mjpeg-decode",
flag_descriptions::kAcceleratedMjpegDecodeName, flag_descriptions::kAcceleratedMjpegDecodeName,
flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS, flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
@ -109,10 +110,18 @@ index 7b0853f..53009dc 100644
flag_descriptions::kV8CacheOptionsDescription, kOsAll, flag_descriptions::kV8CacheOptionsDescription, kOsAll,
MULTI_VALUE_TYPE(kV8CacheOptionsChoices)}, MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc 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 --- a/chrome/browser/chromeos/login/chrome_restart_request.cc
+++ b/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::kDisable2dCanvasImageChromium,
::switches::kDisableAccelerated2dCanvas, ::switches::kDisableAccelerated2dCanvas,
::switches::kDisableAcceleratedJpegDecoding, ::switches::kDisableAcceleratedJpegDecoding,
@ -126,7 +135,7 @@ index 348bdb7..aa64bdd 100644
::switches::kDisableBlinkFeatures, ::switches::kDisableBlinkFeatures,
::switches::kDisableCastStreamingHWEncoding, ::switches::kDisableCastStreamingHWEncoding,
::switches::kDisableDistanceFieldText, ::switches::kDisableDistanceFieldText,
@@ -168,7 +173,7 @@ @@ -169,7 +175,7 @@
::switches::kDisableWebGLImageChromium, ::switches::kDisableWebGLImageChromium,
::switches::kEnableWebGLImageChromium, ::switches::kEnableWebGLImageChromium,
::switches::kEnableWebVR, ::switches::kEnableWebVR,
@ -136,28 +145,12 @@ index 348bdb7..aa64bdd 100644
::switches::kDisableWebRtcHWEncoding, ::switches::kDisableWebRtcHWEncoding,
#endif #endif
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc 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 --- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -518,6 +518,7 @@ @@ -11,6 +11,13 @@
"Enabling this option allows web applications to access the WebGL " "Enables the use of the GPU to perform 2d canvas rendering instead of "
"Extensions that are still in draft status."; "using software rendering.";
+#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)
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+const char kAcceleratedVideoName[] = "Hardware-accelerated video"; +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" + "Hardware-accelerated video where VA-API driver is installed on the"
+ "system."; + "system.";
+#endif +#endif
+
const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode"; const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
const char kAcceleratedVideoDecodeDescription[] = 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) #endif // defined(OS_MACOSX)
-#if defined(OS_CHROMEOS) -#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_LINUX) +#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
const char kAcceleratedMjpegDecodeName[] = const char kAcceleratedMjpegDecodeName[] =
"Hardware-accelerated mjpeg decode for captured frame"; "Hardware-accelerated mjpeg decode for captured frame";
@@ -1505,7 +1513,7 @@ @@ -2126,7 +2135,7 @@
"Enable hardware-accelerated mjpeg decode for captured frame where " "Enable hardware-accelerated mjpeg decode for captured frame where "
"available."; "available.";
-#endif // defined(OS_CHROMEOS) -#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 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 --- a/chrome/browser/flag_descriptions.h
+++ b/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 kAccelerated2dCanvasName[];
extern const char kAccelerated2dCanvasDescription[]; 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 kAcceleratedVideoName[];
+extern const char kAcceleratedVideoDescription[]; +extern const char kAcceleratedVideoDescription[];
+#endif +#endif
extern const char kAcceleratedVideoDecodeName[]; extern const char kAcceleratedVideoDecodeName[];
extern const char kAcceleratedVideoDecodeDescription[]; extern const char kAcceleratedVideoDecodeDescription[];
@@ -1204,13 +1208,17 @@ @@ -1251,13 +1255,17 @@
#endif // defined(OS_MACOSX) #endif // defined(OS_MACOSX)
-// Chrome OS ------------------------------------------------------------------ -// Chrome OS ------------------------------------------------------------------
- -
-#if defined(OS_CHROMEOS) -#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 kAcceleratedMjpegDecodeName[];
extern const char kAcceleratedMjpegDecodeDescription[]; extern const char kAcceleratedMjpegDecodeDescription[];
@ -223,14 +233,14 @@ index 8e14959..dbac6a4 100644
extern const char kAllowTouchpadThreeFingerClickDescription[]; extern const char kAllowTouchpadThreeFingerClickDescription[];
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc 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 --- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc +++ b/content/browser/gpu/compositor_util.cc
@@ -105,7 +105,11 @@ @@ -104,7 +104,11 @@
{"video_decode", {"video_decode",
manager->IsFeatureBlacklisted( manager->IsFeatureBlacklisted(
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE), 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), + !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
+#else +#else
command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode), command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
@ -238,11 +248,11 @@ index 1298d75..c21c8d8 100644
"Accelerated video decode has been disabled, either via blacklist," "Accelerated video decode has been disabled, either via blacklist,"
" about:flags or the command line.", " about:flags or the command line.",
true}, true},
@@ -113,7 +117,11 @@ @@ -112,7 +116,11 @@
{"video_encode", {"video_encode",
manager->IsFeatureBlacklisted( manager->IsFeatureBlacklisted(
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE), 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), + !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
+#else +#else
command_line.HasSwitch(switches::kDisableWebRtcHWEncoding), command_line.HasSwitch(switches::kDisableWebRtcHWEncoding),
@ -251,14 +261,14 @@ index 1298d75..c21c8d8 100644
" about:flags or the command line.", " about:flags or the command line.",
true}, true},
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc 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 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -760,7 +760,11 @@ @@ -760,7 +760,11 @@
DCHECK(command_line); DCHECK(command_line);
if (ShouldDisableAcceleratedVideoDecode(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); + command_line->AppendSwitch(switches::kEnableAcceleratedVideo);
+#else +#else
command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
@ -266,24 +276,24 @@ index 3c7c214..27f90dd 100644
#if defined(USE_AURA) #if defined(USE_AURA)
if (!CanUseGpuBrowserCompositor()) if (!CanUseGpuBrowserCompositor())
@@ -825,7 +829,11 @@ @@ -818,7 +822,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
}
} }
@@ -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 = const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess(); base::CommandLine::ForCurrentProcess();
if (!ShouldDisableAcceleratedVideoDecode(command_line) && if (!ShouldDisableAcceleratedVideoDecode(command_line) &&
- !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { - !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) + command_line->HasSwitch(switches::kEnableAcceleratedVideo)
+#else +#else
+ !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) + !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
@ -292,13 +302,13 @@ index 3c7c214..27f90dd 100644
prefs->pepper_accelerated_video_decode_enabled = true; prefs->pepper_accelerated_video_decode_enabled = true;
} }
prefs->disable_2d_canvas_copy_on_write = prefs->disable_2d_canvas_copy_on_write =
@@ -1105,7 +1118,13 @@ @@ -1107,7 +1120,13 @@
// to resolve crbug/442039 has been collected. // to resolve crbug/442039 has been collected.
const std::string group_name = base::FieldTrialList::FindFullName( const std::string group_name = base::FieldTrialList::FindFullName(
"DisableAcceleratedVideoDecode"); "DisableAcceleratedVideoDecode");
- if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { - if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
+ if ( + if (
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo) + !command_line->HasSwitch(switches::kEnableAcceleratedVideo)
+#else +#else
+ command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) + command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
@ -308,14 +318,14 @@ index 3c7c214..27f90dd 100644
return false; return false;
} }
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc 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 --- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc
@@ -116,7 +116,11 @@ @@ -116,7 +116,11 @@
// Command-line switches to propagate to the GPU process. // Command-line switches to propagate to the GPU process.
static const char* const kSwitchNames[] = { static const char* const kSwitchNames[] = {
switches::kCreateDefaultGLContext, switches::kCreateDefaultGLContext,
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
+ switches::kEnableAcceleratedVideo, + switches::kEnableAcceleratedVideo,
+#else +#else
switches::kDisableAcceleratedVideoDecode, switches::kDisableAcceleratedVideoDecode,
@ -333,14 +343,14 @@ index 40fbc05..cb63536 100644
#endif #endif
#if defined(OS_WIN) #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 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 --- a/content/browser/renderer_host/media/video_capture_browsertest.cc
+++ b/content/browser/renderer_host/media/video_capture_browsertest.cc +++ b/content/browser/renderer_host/media/video_capture_browsertest.cc
@@ -154,8 +154,13 @@ @@ -154,8 +154,13 @@
base::CommandLine::ForCurrentProcess()->AppendSwitch( base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kUseFakeJpegDecodeAccelerator); switches::kUseFakeJpegDecodeAccelerator);
} else { } else {
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
+ base::CommandLine::ForCurrentProcess()->AppendSwitch( + base::CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableAcceleratedMjpegDecode); + switches::kEnableAcceleratedMjpegDecode);
+#else +#else
@ -351,10 +361,10 @@ index e4c37d1..8aadccb 100644
if (params_.use_mojo_service) { if (params_.use_mojo_service) {
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 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 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 --- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
+++ b/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 = bool is_platform_supported =
base::CommandLine::ForCurrentProcess()->HasSwitch( base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kUseFakeJpegDecodeAccelerator); switches::kUseFakeJpegDecodeAccelerator);
@ -368,7 +378,7 @@ index 0bf2749..ed646e6 100644
#endif #endif
if (!is_platform_supported || 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( + !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAcceleratedMjpegDecode) + switches::kEnableAcceleratedMjpegDecode)
+#else +#else
@ -381,10 +391,10 @@ index 0bf2749..ed646e6 100644
RecordInitDecodeUMA_Locked(); RecordInitDecodeUMA_Locked();
return; return;
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc 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 --- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2104,7 +2104,11 @@ @@ -2450,7 +2450,11 @@
switches::kDisable2dCanvasImageChromium, switches::kDisable2dCanvasImageChromium,
switches::kDisable3DAPIs, switches::kDisable3DAPIs,
switches::kDisableAcceleratedJpegDecoding, switches::kDisableAcceleratedJpegDecoding,
@ -396,7 +406,7 @@ index fc876c6..177f713 100644
switches::kDisableBackgroundTimerThrottling, switches::kDisableBackgroundTimerThrottling,
switches::kDisableBlinkFeatures, switches::kDisableBlinkFeatures,
switches::kDisableBreakpad, switches::kDisableBreakpad,
@@ -2259,8 +2263,10 @@ @@ -2603,8 +2607,10 @@
switches::kEnablePepperTesting, switches::kEnablePepperTesting,
#endif #endif
#if BUILDFLAG(ENABLE_WEBRTC) #if BUILDFLAG(ENABLE_WEBRTC)
@ -408,7 +418,7 @@ index fc876c6..177f713 100644
switches::kEnableWebRtcStunOrigin, switches::kEnableWebRtcStunOrigin,
switches::kEnforceWebRtcIPPermissionCheck, switches::kEnforceWebRtcIPPermissionCheck,
diff --git a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc 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 --- a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
+++ b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc +++ b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
@@ -58,7 +58,12 @@ @@ -58,7 +58,12 @@
@ -426,7 +436,7 @@ index 7b9ec99..67cd975 100644
private: private:
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 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 --- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc +++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
@@ -56,22 +56,6 @@ @@ -56,22 +56,6 @@
@ -478,7 +488,7 @@ index 9ae6231..060df98 100644
} }
intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args, intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args,
@@ -303,33 +280,6 @@ @@ -296,33 +273,6 @@
GpuBrokerProcessPolicy::Create, GpuBrokerProcessPolicy::Create,
std::vector<BrokerFilePermission>()); // No extra files in whitelist. 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 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 --- a/content/gpu/BUILD.gn
+++ b/content/gpu/BUILD.gn +++ b/content/gpu/BUILD.gn
@@ -102,7 +102,7 @@ @@ -45,7 +45,6 @@
] ]
}
- if (is_chromeos && current_cpu != "arm") { configs += [ "//content:content_implementation" ]
+ if ((is_chromeos || is_desktop_linux) && current_cpu != "arm") { -
configs += [ "//third_party/libva:libva_config" ] 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 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 --- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc
@@ -83,7 +83,7 @@ @@ -246,7 +246,7 @@
#include "ui/ozone/public/ozone_platform.h" // 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 #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 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 --- a/content/public/browser/gpu_utils.cc
+++ b/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 = gpu_preferences.ui_prioritize_in_gpu_process =
command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess); command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess);
gpu_preferences.disable_accelerated_video_decode = gpu_preferences.disable_accelerated_video_decode =
@ -574,7 +600,7 @@ index a4145ba..1300727 100644
command_line->HasSwitch(switches::kDisableWebRtcHWEncoding); command_line->HasSwitch(switches::kDisableWebRtcHWEncoding);
#endif #endif
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc 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 --- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc
@@ -85,12 +85,21 @@ @@ -85,12 +85,21 @@
@ -600,7 +626,7 @@ index 6cfff13..5e70009 100644
// Disables hardware acceleration of video decode, where available. // Disables hardware acceleration of video decode, where available.
const char kDisableAcceleratedVideoDecode[] = const char kDisableAcceleratedVideoDecode[] =
"disable-accelerated-video-decode"; "disable-accelerated-video-decode";
@@ -909,11 +918,13 @@ @@ -915,11 +924,13 @@
// ignores this switch on its stable and beta channels. // ignores this switch on its stable and beta channels.
const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption"; const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
@ -615,7 +641,7 @@ index 6cfff13..5e70009 100644
// Enables negotiation of GCM cipher suites from RFC 7714 for SRTP in WebRTC. // Enables negotiation of GCM cipher suites from RFC 7714 for SRTP in WebRTC.
// See https://tools.ietf.org/html/rfc7714 for further information. // 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 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 --- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h
@@ -34,7 +34,11 @@ @@ -34,7 +34,11 @@
@ -631,16 +657,16 @@ index c56895a..83d70b3 100644
CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[]; CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
extern const char kDisableBackingStoreLimit[]; extern const char kDisableBackingStoreLimit[];
@@ -107,6 +111,9 @@ @@ -107,6 +111,9 @@
CONTENT_EXPORT extern const char kDisableZeroCopyDxgiVideo[];
CONTENT_EXPORT extern const char kDomAutomationController[]; CONTENT_EXPORT extern const char kDomAutomationController[];
extern const char kDisable2dCanvasClipAntialiasing[]; extern const char kDisable2dCanvasClipAntialiasing[];
CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[];
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
+CONTENT_EXPORT extern const char kEnableAcceleratedVideo[]; +CONTENT_EXPORT extern const char kEnableAcceleratedVideo[];
+#endif +#endif
CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[]; CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[]; CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
CONTENT_EXPORT extern const char kEnableBlinkFeatures[]; CONTENT_EXPORT extern const char kEnableBlinkFeatures[];
@@ -261,8 +268,10 @@ @@ -257,8 +264,10 @@
#if BUILDFLAG(ENABLE_WEBRTC) #if BUILDFLAG(ENABLE_WEBRTC)
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[]; 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 kEnableWebRtcStunOrigin[];
CONTENT_EXPORT extern const char kEnforceWebRtcIPPermissionCheck[]; 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 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 --- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc +++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -239,10 +239,19 @@ @@ -240,10 +240,19 @@
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) { if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
@ -677,10 +703,10 @@ index 963de65..e61aeb3 100644
} }
} }
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc 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 --- a/content/renderer/render_thread_impl.cc
+++ b/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 = scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
GetMediaThreadTaskRunner(); GetMediaThreadTaskRunner();
const bool enable_video_accelerator = const bool enable_video_accelerator =
@ -706,7 +732,7 @@ index 8dd0ff1..d6e5c59 100644
bool disable_vaapi_accelerated_video_encode = false; bool disable_vaapi_accelerated_video_encode = false;
#endif #endif
diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json 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 --- a/gpu/config/software_rendering_list.json
+++ b/gpu/config/software_rendering_list.json +++ b/gpu/config/software_rendering_list.json
@@ -371,17 +371,6 @@ @@ -371,17 +371,6 @@
@ -727,51 +753,58 @@ index 006cc6d..2dcde7d 100644
"id": 50, "id": 50,
"description": "Disable VMware software renderer on older Mesa", "description": "Disable VMware software renderer on older Mesa",
"cr_bugs": [145531, 332596, 571899, 629434], "cr_bugs": [145531, 332596, 571899, 629434],
diff --git a/media/BUILD.gn b/media/BUILD.gn diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn
index aae61e0..6c87577 100644 index e8ff812..18735d2 100644
--- a/media/BUILD.gn --- a/media/filters/BUILD.gn
+++ b/media/BUILD.gn +++ b/media/filters/BUILD.gn
@@ -354,7 +354,7 @@ @@ -195,7 +195,7 @@
] ]
} }
- if (current_cpu != "arm" && is_chromeos) { - if (current_cpu != "arm" && is_chromeos) {
+ if (current_cpu != "arm" && (is_chromeos || is_desktop_linux)) { + if (current_cpu != "arm" && (is_chromeos || is_desktop_linux)) {
sources += [ sources += [
"filters/h264_bitstream_buffer.cc", "h264_bitstream_buffer.cc",
"filters/h264_bitstream_buffer.h", "h264_bitstream_buffer.h",
diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn 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 --- a/media/gpu/BUILD.gn
+++ b/media/gpu/BUILD.gn +++ b/media/gpu/BUILD.gn
@@ -18,7 +18,7 @@ @@ -25,6 +25,14 @@
import("//build/config/mac/mac_sdk.gni") import("//build/config/mac/mac_sdk.gni")
} }
-if (is_chromeos && current_cpu != "arm") { +if (is_desktop_linux && use_vaapi) {
+if ((is_chromeos || is_desktop_linux) && current_cpu != "arm") { + import("//build/config/linux/pkg_config.gni")
+
+ pkg_config("libva_config") {
+ packages = [ "libva" ]
+ }
+}
+
if (use_vaapi) {
action("libva_generate_stubs") { action("libva_generate_stubs") {
extra_header = "va_stub_header.fragment" extra_header = "va_stub_header.fragment"
@@ -258,7 +266,7 @@
@@ -234,7 +234,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) {
+ if (is_chromeos || is_desktop_linux) { + if (is_chromeos || is_desktop_linux) {
sources += [ sources += [
"vp8_decoder.cc", "vp8_decoder.cc",
"vp8_decoder.h", "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 # TODO(watk): Run this on bots. http://crbug.com/461437
@ -780,7 +813,7 @@ index 1b58a14..0fb6a5f 100644
test("video_decode_accelerator_unittest") { test("video_decode_accelerator_unittest") {
sources = [ sources = [
"video_accelerator_unittest_helpers.h", "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") { test("video_encode_accelerator_unittest") {
deps = [ deps = [
"//base", "//base",
@@ -517,7 +517,7 @@ @@ -532,7 +543,7 @@
} }
} }
@ -799,10 +832,10 @@ index 1b58a14..0fb6a5f 100644
deps = [ deps = [
"//base", "//base",
diff --git a/media/gpu/gpu_video_decode_accelerator_factory.cc b/media/gpu/gpu_video_decode_accelerator_factory.cc 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 --- a/media/gpu/gpu_video_decode_accelerator_factory.cc
+++ b/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" #include "media/gpu/dxva_video_decode_accelerator_win.h"
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
#include "media/gpu/vt_video_decode_accelerator_mac.h" #include "media/gpu/vt_video_decode_accelerator_mac.h"
@ -811,7 +844,7 @@ index e926ad6..0dab418 100644
#if defined(USE_V4L2_CODEC) #if defined(USE_V4L2_CODEC)
#include "media/gpu/v4l2_device.h" #include "media/gpu/v4l2_device.h"
#include "media/gpu/v4l2_slice_video_decode_accelerator.h" #include "media/gpu/v4l2_slice_video_decode_accelerator.h"
@@ -82,11 +82,12 @@ @@ -85,6 +85,7 @@
// profile (instead of calculating a superset). // profile (instead of calculating a superset).
// TODO(posciak,henryhsu): improve this so that we choose a superset of // TODO(posciak,henryhsu): improve this so that we choose a superset of
// resolutions and other supported profile parameters. // resolutions and other supported profile parameters.
@ -819,49 +852,12 @@ index e926ad6..0dab418 100644
#if defined(OS_WIN) #if defined(OS_WIN)
capabilities.supported_profiles = capabilities.supported_profiles =
DXVAVideoDecodeAccelerator::GetSupportedProfiles(gpu_preferences, 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 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 --- a/media/gpu/gpu_video_encode_accelerator_factory.cc
+++ b/media/gpu/gpu_video_encode_accelerator_factory.cc +++ b/media/gpu/gpu_video_encode_accelerator_factory.cc
@@ -7,7 +7,7 @@ @@ -9,7 +9,7 @@
#include "base/memory/ptr_util.h" #include "media/gpu/features.h"
#include "media/gpu/gpu_video_accelerator_util.h" #include "media/gpu/gpu_video_accelerator_util.h"
-#if defined(OS_CHROMEOS) -#if defined(OS_CHROMEOS)
@ -869,64 +865,11 @@ index 873b64a..9ebcd14 100644
#if defined(USE_V4L2_CODEC) #if defined(USE_V4L2_CODEC)
#include "media/gpu/v4l2_video_encode_accelerator.h" #include "media/gpu/v4l2_video_encode_accelerator.h"
#endif #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 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 --- a/media/gpu/vaapi_wrapper.cc
+++ b/media/gpu/vaapi_wrapper.cc +++ b/media/gpu/vaapi_wrapper.cc
@@ -1132,6 +1132,7 @@ @@ -1110,6 +1110,7 @@
if (drm_file.IsValid()) if (drm_file.IsValid())
GetDisplayState()->SetDrmFd(drm_file.GetPlatformFile()); GetDisplayState()->SetDrmFd(drm_file.GetPlatformFile());
#endif #endif
@ -934,3 +877,33 @@ index 5146f43..a1c8a1e 100644
} }
// static // 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;

View File

@ -1,10 +1,27 @@
--- a/tools/gn/bootstrap/bootstrap.py 2017-08-10 21:13:27.316180673 +0200 commit 96c271f8ab2be7ea4199078ea65ac50c6ada4685
+++ b/tools/gn/bootstrap/bootstrap.py 2017-08-10 21:13:23.544160535 +0200 Author: Pawel Hajdan, Jr <phajdan.jr@chromium.org>
@@ -486,6 +486,7 @@ Date: Wed Jul 26 21:51:54 2017 +0000
'base/synchronization/lock.cc',
'base/sys_info.cc', wip
'base/task_runner.cc',
+ 'base/task_scheduler/environment_config.cc', diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
'base/task_scheduler/delayed_task_manager.cc', index 1390560f8e37..ff2ae57c46b0 100755
'base/task_scheduler/post_task.cc', --- a/tools/gn/bootstrap/bootstrap.py
'base/task_scheduler/priority_queue.cc', +++ 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',

View File

@ -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

View File

@ -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();
}

View File

@ -1,10 +1,7 @@
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.cc b/chrome/browser/ui/libgtkui/gtk_ui.cc --- a/chrome/browser/ui/libgtkui/gtk_ui.cc 2017-09-07 23:15:07.376937045 +0200
index cef1ef0..7df1d0c 100644 +++ b/chrome/browser/ui/libgtkui/gtk_ui.cc 2017-09-07 23:16:15.281262029 +0200
--- a/chrome/browser/ui/libgtkui/gtk_ui.cc @@ -1048,18 +1048,52 @@
+++ b/chrome/browser/ui/libgtkui/gtk_ui.cc native_theme_->NotifyObservers();
@@ -315,15 +315,52 @@
return params;
} }
+float GtkDpiToScaleFactor(int dpi) { +float GtkDpiToScaleFactor(int dpi) {
@ -40,15 +37,18 @@ index cef1ef0..7df1d0c 100644
+ return GtkDpiToScaleFactor(gtk_dpi); + return GtkDpiToScaleFactor(gtk_dpi);
+} +}
+ +
float GetRawDeviceScaleFactor() { float GtkUi::GetRawDeviceScaleFactor() {
if (display::Display::HasForceDeviceScaleFactor()) if (display::Display::HasForceDeviceScaleFactor())
return display::Display::GetForcedDeviceScaleFactor(); return display::Display::GetForcedDeviceScaleFactor();
- GdkScreen* screen = gdk_screen_get_default(); - GdkScreen* screen = gdk_screen_get_default();
- gint scale = gdk_screen_get_monitor_scale_factor( - gint scale = gtk_widget_get_scale_factor(fake_window_);
- screen, gdk_screen_get_primary_monitor(screen));
- gdouble resolution = gdk_screen_get_resolution(screen); - 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(); + float scale = GetScaleFromGdkScreenSettings();
+ if (scale > 0) + if (scale > 0)
+ return scale; + return scale;
@ -60,4 +60,4 @@ index cef1ef0..7df1d0c 100644
+ return 1; + return 1;
} }
views::LinuxUI::NonClientMiddleClickAction GetDefaultMiddleClickAction() { void GtkUi::UpdateDeviceScaleFactor() {

View File

@ -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;