262 lines
12 KiB
Diff
262 lines
12 KiB
Diff
diff -up chromium-70.0.3538.110/chrome/browser/about_flags.cc.vaapi chromium-70.0.3538.110/chrome/browser/about_flags.cc
|
|
--- chromium-70.0.3538.110/chrome/browser/about_flags.cc.vaapi 2018-11-19 13:55:02.000000000 -0500
|
|
+++ chromium-70.0.3538.110/chrome/browser/about_flags.cc 2018-11-27 16:32:03.917049560 -0500
|
|
@@ -1776,7 +1776,7 @@ const FeatureEntry kFeatureEntries[] = {
|
|
"disable-accelerated-video-decode",
|
|
flag_descriptions::kAcceleratedVideoDecodeName,
|
|
flag_descriptions::kAcceleratedVideoDecodeDescription,
|
|
- kOsMac | kOsWin | kOsCrOS | kOsAndroid,
|
|
+ kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux,
|
|
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
|
|
},
|
|
#if defined(OS_WIN)
|
|
@@ -2458,12 +2458,12 @@ const FeatureEntry kFeatureEntries[] = {
|
|
FEATURE_VALUE_TYPE(features::kOpenVR)},
|
|
#endif // ENABLE_OPENVR
|
|
#endif // ENABLE_VR
|
|
-#if defined(OS_CHROMEOS)
|
|
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
|
{"disable-accelerated-mjpeg-decode",
|
|
flag_descriptions::kAcceleratedMjpegDecodeName,
|
|
- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
|
|
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
|
|
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
|
|
-#endif // OS_CHROMEOS
|
|
+#endif // OS_CHROMEOS OS_LINUX
|
|
{"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
|
|
flag_descriptions::kV8CacheOptionsDescription, kOsAll,
|
|
MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
|
|
@@ -4449,12 +4449,14 @@ const FeatureEntry kFeatureEntries[] = {
|
|
"AutofillDropdownLayout")},
|
|
#endif // OS_ANDROID
|
|
|
|
-#if defined(OS_CHROMEOS)
|
|
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
|
{"enable-vaapi-jpeg-image-decode-acceleration",
|
|
flag_descriptions::kVaapiJpegImageDecodeAccelerationName,
|
|
- flag_descriptions::kVaapiJpegImageDecodeAccelerationDescription, kOsCrOS,
|
|
+ flag_descriptions::kVaapiJpegImageDecodeAccelerationDescription, kOsCrOS | kOsLinux,
|
|
FEATURE_VALUE_TYPE(features::kVaapiJpegImageDecodeAcceleration)},
|
|
+#endif
|
|
|
|
+#if defined(OS_CHROMEOS)
|
|
{"enable-home-launcher-gestures",
|
|
flag_descriptions::kEnableHomeLauncherGesturesName,
|
|
flag_descriptions::kEnableHomeLauncherGesturesDescription, kOsCrOS,
|
|
diff -up chromium-70.0.3538.110/chrome/browser/flag_descriptions.cc.vaapi chromium-70.0.3538.110/chrome/browser/flag_descriptions.cc
|
|
--- chromium-70.0.3538.110/chrome/browser/flag_descriptions.cc.vaapi 2018-11-19 13:55:03.000000000 -0500
|
|
+++ chromium-70.0.3538.110/chrome/browser/flag_descriptions.cc 2018-11-27 16:32:03.917049560 -0500
|
|
@@ -3053,9 +3053,9 @@ const char kTextSuggestionsTouchBarDescr
|
|
|
|
#endif
|
|
|
|
-// Chrome OS -------------------------------------------------------------------
|
|
+// Chrome OS and Linux -------------------------------------------------------------------
|
|
|
|
-#if defined(OS_CHROMEOS)
|
|
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
|
|
|
const char kAcceleratedMjpegDecodeName[] =
|
|
"Hardware-accelerated mjpeg decode for captured frame";
|
|
@@ -3063,6 +3063,18 @@ const char kAcceleratedMjpegDecodeDescri
|
|
"Enable hardware-accelerated mjpeg decode for captured frame where "
|
|
"available.";
|
|
|
|
+const char kVaapiJpegImageDecodeAccelerationName[] =
|
|
+ "VA-API JPEG decode acceleration for images";
|
|
+const char kVaapiJpegImageDecodeAccelerationDescription[] =
|
|
+ "Enable or disable decode acceleration of JPEG images (as opposed to camera"
|
|
+ " captures) using the VA-API.";
|
|
+
|
|
+#endif // defined(OS_CHROMEOS) defined(OS_LINUX) and !defined(OS_ANDROID)
|
|
+
|
|
+// Only Chrome OS ------------------------------------------------------
|
|
+
|
|
+#if defined(OS_CHROMEOS)
|
|
+
|
|
const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click";
|
|
const char kAllowTouchpadThreeFingerClickDescription[] =
|
|
"Enables touchpad three-finger-click as middle button.";
|
|
@@ -3570,12 +3582,6 @@ const char kUseMonitorColorSpaceDescript
|
|
"Enables Chrome to use the color space information provided by the monitor"
|
|
" instead of the default sRGB color space.";
|
|
|
|
-const char kVaapiJpegImageDecodeAccelerationName[] =
|
|
- "VA-API JPEG decode acceleration for images";
|
|
-const char kVaapiJpegImageDecodeAccelerationDescription[] =
|
|
- "Enable or disable decode acceleration of JPEG images (as opposed to camera"
|
|
- " captures) using the VA-API.";
|
|
-
|
|
const char kVideoPlayerChromecastSupportName[] =
|
|
"Experimental Chromecast support for Video Player";
|
|
const char kVideoPlayerChromecastSupportDescription[] =
|
|
diff -up chromium-70.0.3538.110/chrome/browser/flag_descriptions.h.vaapi chromium-70.0.3538.110/chrome/browser/flag_descriptions.h
|
|
--- chromium-70.0.3538.110/chrome/browser/flag_descriptions.h.vaapi 2018-11-19 13:55:03.000000000 -0500
|
|
+++ chromium-70.0.3538.110/chrome/browser/flag_descriptions.h 2018-11-27 16:32:03.918049538 -0500
|
|
@@ -1846,13 +1846,22 @@ extern const char kPermissionPromptPersi
|
|
|
|
#endif // defined(OS_MACOSX)
|
|
|
|
-// Chrome OS ------------------------------------------------------------------
|
|
+// Chrome OS and Linux ------------------------------------------------------------------
|
|
|
|
-#if defined(OS_CHROMEOS)
|
|
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
|
|
|
extern const char kAcceleratedMjpegDecodeName[];
|
|
extern const char kAcceleratedMjpegDecodeDescription[];
|
|
|
|
+extern const char kVaapiJpegImageDecodeAccelerationName[];
|
|
+extern const char kVaapiJpegImageDecodeAccelerationDescription[];
|
|
+
|
|
+#endif
|
|
+
|
|
+// Chrome OS ----------------------------------------------------------------------
|
|
+
|
|
+#if defined(OS_CHROMEOS)
|
|
+
|
|
extern const char kAllowTouchpadThreeFingerClickName[];
|
|
extern const char kAllowTouchpadThreeFingerClickDescription[];
|
|
|
|
@@ -2161,9 +2170,6 @@ extern const char kUseMashDescription[];
|
|
extern const char kUseMonitorColorSpaceName[];
|
|
extern const char kUseMonitorColorSpaceDescription[];
|
|
|
|
-extern const char kVaapiJpegImageDecodeAccelerationName[];
|
|
-extern const char kVaapiJpegImageDecodeAccelerationDescription[];
|
|
-
|
|
extern const char kVideoPlayerChromecastSupportName[];
|
|
extern const char kVideoPlayerChromecastSupportDescription[];
|
|
|
|
diff -up chromium-70.0.3538.110/components/viz/service/main/viz_main_impl.cc.vaapi chromium-70.0.3538.110/components/viz/service/main/viz_main_impl.cc
|
|
--- chromium-70.0.3538.110/components/viz/service/main/viz_main_impl.cc.vaapi 2018-11-19 13:55:07.000000000 -0500
|
|
+++ chromium-70.0.3538.110/components/viz/service/main/viz_main_impl.cc 2018-11-27 16:32:03.918049538 -0500
|
|
@@ -41,7 +41,7 @@ std::unique_ptr<base::Thread> CreateAndS
|
|
// It should be possible to use |main_task_runner_| for doing IO tasks.
|
|
base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
|
|
thread_options.priority = base::ThreadPriority::NORMAL;
|
|
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
|
|
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
|
|
// TODO(reveman): Remove this in favor of setting it explicitly for each
|
|
// type of process.
|
|
thread_options.priority = base::ThreadPriority::DISPLAY;
|
|
diff -up chromium-70.0.3538.110/content/gpu/BUILD.gn.vaapi chromium-70.0.3538.110/content/gpu/BUILD.gn
|
|
--- chromium-70.0.3538.110/content/gpu/BUILD.gn.vaapi 2018-11-19 13:55:07.000000000 -0500
|
|
+++ chromium-70.0.3538.110/content/gpu/BUILD.gn 2018-11-27 16:32:03.926049365 -0500
|
|
@@ -6,6 +6,7 @@ import("//build/config/jumbo.gni")
|
|
import("//build/config/ui.gni")
|
|
import("//gpu/vulkan/features.gni")
|
|
import("//media/media_options.gni")
|
|
+import("//media/gpu/args.gni")
|
|
import("//ui/ozone/ozone.gni")
|
|
|
|
# See //content/BUILD.gn for how this works.
|
|
@@ -134,4 +135,9 @@ target(link_target_type, "gpu_sources")
|
|
(!is_chromecast || is_cast_desktop_build)) {
|
|
configs += [ "//build/config/linux/dri" ]
|
|
}
|
|
+
|
|
+ # Use vaapi on desktop Linux builds when use_vaapi is set
|
|
+ if (is_desktop_linux && use_vaapi) {
|
|
+ public_configs = [ "//media/gpu:libva_config" ]
|
|
+ }
|
|
}
|
|
diff -up chromium-70.0.3538.110/content/gpu/gpu_main.cc.vaapi chromium-70.0.3538.110/content/gpu/gpu_main.cc
|
|
--- chromium-70.0.3538.110/content/gpu/gpu_main.cc.vaapi 2018-11-19 13:55:07.000000000 -0500
|
|
+++ chromium-70.0.3538.110/content/gpu/gpu_main.cc 2018-11-27 16:33:26.059266401 -0500
|
|
@@ -283,7 +283,7 @@ int GpuMain(const MainFunctionParams& pa
|
|
|
|
base::PlatformThread::SetName("CrGpuMain");
|
|
|
|
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
|
|
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
|
|
// Set thread priority before sandbox initialization.
|
|
base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
|
|
#endif
|
|
@@ -316,7 +316,7 @@ int GpuMain(const MainFunctionParams& pa
|
|
GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
|
|
|
|
base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
|
|
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
|
|
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
|
|
io_thread_priority = base::ThreadPriority::DISPLAY;
|
|
#endif
|
|
|
|
diff -up chromium-70.0.3538.110/gpu/config/software_rendering_list.json.vaapi chromium-70.0.3538.110/gpu/config/software_rendering_list.json
|
|
--- chromium-70.0.3538.110/gpu/config/software_rendering_list.json.vaapi 2018-11-19 13:55:08.000000000 -0500
|
|
+++ chromium-70.0.3538.110/gpu/config/software_rendering_list.json 2018-11-27 16:32:03.936049148 -0500
|
|
@@ -374,17 +374,6 @@
|
|
]
|
|
},
|
|
{
|
|
- "id": 48,
|
|
- "description": "Accelerated video decode is unavailable on Linux",
|
|
- "cr_bugs": [137247],
|
|
- "os": {
|
|
- "type": "linux"
|
|
- },
|
|
- "features": [
|
|
- "accelerated_video_decode"
|
|
- ]
|
|
- },
|
|
- {
|
|
"id": 50,
|
|
"description": "Disable VMware software renderer on older Mesa",
|
|
"cr_bugs": [145531, 332596, 571899, 629434],
|
|
diff -up chromium-70.0.3538.110/media/base/media_switches.cc.vaapi chromium-70.0.3538.110/media/base/media_switches.cc
|
|
--- chromium-70.0.3538.110/media/base/media_switches.cc.vaapi 2018-11-19 13:55:09.000000000 -0500
|
|
+++ chromium-70.0.3538.110/media/base/media_switches.cc 2018-11-27 16:32:03.937049127 -0500
|
|
@@ -468,7 +468,7 @@ bool IsVideoCaptureAcceleratedJpegDecodi
|
|
switches::kUseFakeJpegDecodeAccelerator)) {
|
|
return true;
|
|
}
|
|
-#if defined(OS_CHROMEOS)
|
|
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
|
return true;
|
|
#endif
|
|
return false;
|
|
diff -up chromium-70.0.3538.110/media/filters/BUILD.gn.vaapi chromium-70.0.3538.110/media/filters/BUILD.gn
|
|
--- chromium-70.0.3538.110/media/filters/BUILD.gn.vaapi 2018-11-19 13:55:09.000000000 -0500
|
|
+++ chromium-70.0.3538.110/media/filters/BUILD.gn 2018-11-27 16:34:43.272581693 -0500
|
|
@@ -5,6 +5,7 @@
|
|
import("//build/config/jumbo.gni")
|
|
import("//media/media_options.gni")
|
|
import("//third_party/libaom/options.gni")
|
|
+import("//media/gpu/args.gni")
|
|
|
|
jumbo_source_set("filters") {
|
|
# Do not expand the visibility here without double-checking with OWNERS, this
|
|
@@ -198,7 +199,7 @@ jumbo_source_set("filters") {
|
|
deps += [ "//media/base/android" ]
|
|
}
|
|
|
|
- if (current_cpu != "arm" && is_linux) {
|
|
+ if (use_vaapi && is_linux) {
|
|
sources += [
|
|
"h264_bitstream_buffer.cc",
|
|
"h264_bitstream_buffer.h",
|
|
diff -up chromium-70.0.3538.110/media/gpu/BUILD.gn.vaapi chromium-70.0.3538.110/media/gpu/BUILD.gn
|
|
--- chromium-70.0.3538.110/media/gpu/BUILD.gn.vaapi 2018-11-19 13:55:09.000000000 -0500
|
|
+++ chromium-70.0.3538.110/media/gpu/BUILD.gn 2018-11-27 16:32:03.937049127 -0500
|
|
@@ -501,6 +501,12 @@ if (use_v4l2_codec || use_vaapi || is_ma
|
|
}
|
|
}
|
|
|
|
+import("//build/config/linux/pkg_config.gni")
|
|
+
|
|
+pkg_config("libva_config") {
|
|
+ packages = [ "libva" ]
|
|
+}
|
|
+
|
|
if (use_vaapi) {
|
|
test("jpeg_encode_accelerator_unittest") {
|
|
deps = [
|
|
@@ -571,6 +577,7 @@ if (use_v4l2_codec || use_vaapi) {
|
|
if (use_ozone) {
|
|
deps += [ "//ui/ozone" ]
|
|
}
|
|
+ public_configs = [ ":libva_config" ]
|
|
}
|
|
}
|
|
|