Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git i/chrome/browser/about_flags.cc w/chrome/browser/about_flags.cc
- index 5ed7048e81..83b5a9faa5 100644
- --- i/chrome/browser/about_flags.cc
- +++ w/chrome/browser/about_flags.cc
- @@ -1230,12 +1230,14 @@ const FeatureEntry kFeatureEntries[] = {
- flag_descriptions::kUiPartialSwapDescription, kOsAll,
- SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
- #if BUILDFLAG(ENABLE_WEBRTC)
- +#if !defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
- {"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
- flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
- SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
- {"disable-webrtc-hw-encoding", flag_descriptions::kWebrtcHwEncodingName,
- flag_descriptions::kWebrtcHwEncodingDescription, kOsAndroid | kOsCrOS,
- SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)},
- +#endif
- {"enable-webrtc-hw-h264-encoding",
- flag_descriptions::kWebrtcHwH264EncodingName,
- flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
- @@ -1527,6 +1529,13 @@ const FeatureEntry kFeatureEntries[] = {
- flag_descriptions::kShowTouchHudDescription, kOsCrOS,
- SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)},
- #endif // OS_CHROMEOS
- +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
- + {
- + "enable-accelerated-video", flag_descriptions::kAcceleratedVideoName,
- + flag_descriptions::kAcceleratedVideoDescription, kOsLinux,
- + SINGLE_VALUE_TYPE(switches::kEnableAcceleratedVideo),
- + },
- +#else
- {
- "disable-accelerated-video-decode",
- flag_descriptions::kAcceleratedVideoDecodeName,
- @@ -1534,6 +1543,7 @@ const FeatureEntry kFeatureEntries[] = {
- kOsMac | kOsWin | kOsCrOS | kOsAndroid,
- SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
- },
- +#endif
- #if defined(OS_WIN)
- {"enable-hdr", flag_descriptions::kEnableHDRName,
- flag_descriptions::kEnableHDRDescription, kOsWin,
- @@ -2245,12 +2255,17 @@ const FeatureEntry kFeatureEntries[] = {
- FEATURE_VALUE_TYPE(features::kOpenVR)},
- #endif // ENABLE_OPENVR
- #endif // ENABLE_VR
- -#if 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)},
- +#elif defined(OS_CHROMEOS)
- {"disable-accelerated-mjpeg-decode",
- flag_descriptions::kAcceleratedMjpegDecodeName,
- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
- SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
- -#endif // OS_CHROMEOS
- +#endif
- {"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
- flag_descriptions::kV8CacheOptionsDescription, kOsAll,
- MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
- diff --git i/chrome/browser/chromeos/login/chrome_restart_request.cc w/chrome/browser/chromeos/login/chrome_restart_request.cc
- index 5a52d36009..1e06e2f529 100644
- --- i/chrome/browser/chromeos/login/chrome_restart_request.cc
- +++ w/chrome/browser/chromeos/login/chrome_restart_request.cc
- @@ -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"
- @@ -84,8 +85,9 @@ void DeriveCommandLine(const GURL& start_url,
- ::switches::kDisable2dCanvasImageChromium,
- ::switches::kDisableAccelerated2dCanvas,
- ::switches::kDisableAcceleratedJpegDecoding,
- + ::switches::kEnableAcceleratedMjpegDecode,
- + ::switches::kEnableAcceleratedVideo,
- ::switches::kDisableAcceleratedMjpegDecode,
- - ::switches::kDisableAcceleratedVideoDecode,
- ::switches::kDisableAcceleratedVideoEncode,
- ::switches::kDisableBlinkFeatures,
- ::switches::kDisableCastStreamingHWEncoding,
- @@ -164,7 +166,7 @@ void DeriveCommandLine(const GURL& start_url,
- ::switches::kDisableWebGLImageChromium,
- ::switches::kEnableWebGLImageChromium,
- ::switches::kEnableWebVR,
- -#if BUILDFLAG(ENABLE_WEBRTC)
- +#if BUILDFLAG(ENABLE_WEBRTC) && (defined(OS_CHROMEOS) || defined(OS_ANDROID))
- ::switches::kDisableWebRtcHWDecoding,
- ::switches::kDisableWebRtcHWEncoding,
- #endif
- diff --git i/chrome/browser/flag_descriptions.cc w/chrome/browser/flag_descriptions.cc
- index ea921685c9..91856003dc 100644
- --- i/chrome/browser/flag_descriptions.cc
- +++ w/chrome/browser/flag_descriptions.cc
- @@ -14,6 +14,13 @@ const char kAccelerated2dCanvasDescription[] =
- "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";
- +const char kAcceleratedVideoDescription[] =
- + "Hardware-accelerated video where VA-API driver is installed on the"
- + "system.";
- +#endif
- +
- const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
- const char kAcceleratedVideoDecodeDescription[] =
- "Hardware-accelerated video decode where available.";
- @@ -1610,6 +1617,7 @@ const char kWebrtcEchoCanceller3Name[] = "WebRTC Echo Canceller 3.";
- 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.";
- @@ -1617,6 +1625,7 @@ const char kWebrtcHwDecodingDescription[] =
- 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[] =
- @@ -2442,14 +2451,16 @@ const char kTranslateNewUxDescription[] =
- // Chrome OS -------------------------------------------------------------------
- -#if defined(OS_CHROMEOS)
- +#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
- const char kAcceleratedMjpegDecodeName[] =
- "Hardware-accelerated mjpeg decode for captured frame";
- const char kAcceleratedMjpegDecodeDescription[] =
- "Enable hardware-accelerated mjpeg decode for captured frame where "
- "available.";
- +#endif
- +#if defined(OS_CHROMEOS)
- const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click";
- const char kAllowTouchpadThreeFingerClickDescription[] =
- "Enables touchpad three-finger-click as middle button.";
- diff --git i/chrome/browser/flag_descriptions.h w/chrome/browser/flag_descriptions.h
- index 9209b4ad59..9c7e52b9cc 100644
- --- i/chrome/browser/flag_descriptions.h
- +++ w/chrome/browser/flag_descriptions.h
- @@ -37,6 +37,10 @@ namespace flag_descriptions {
- extern const char kAccelerated2dCanvasName[];
- extern const char kAccelerated2dCanvasDescription[];
- +#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[];
- @@ -1502,13 +1506,17 @@ extern const char kPermissionPromptPersistenceToggleDescription[];
- #endif // defined(OS_MACOSX)
- -// Chrome OS ------------------------------------------------------------------
- -
- -#if defined(OS_CHROMEOS)
- +#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
- extern const char kAcceleratedMjpegDecodeName[];
- extern const char kAcceleratedMjpegDecodeDescription[];
- +#endif
- +
- +// Chrome OS ------------------------------------------------------------------
- +
- +#if defined(OS_CHROMEOS)
- +
- extern const char kAllowTouchpadThreeFingerClickName[];
- extern const char kAllowTouchpadThreeFingerClickDescription[];
- diff --git i/chrome/browser/ui/libgtkui/BUILD.gn w/chrome/browser/ui/libgtkui/BUILD.gn
- index 505d87c67b..fb5b6792f3 100644
- --- i/chrome/browser/ui/libgtkui/BUILD.gn
- +++ w/chrome/browser/ui/libgtkui/BUILD.gn
- @@ -101,10 +101,10 @@ template("libgtkui") {
- "//printing",
- "//skia",
- - # GTK pulls pangoft2, which requires HarfBuzz symbols. When linking
- - # our own HarfBuzz avoid mixing symbols from system HarfBuzz and
- - # our own through the indirect dependency to harfbuzz-ng here.
- - "//third_party:freetype_harfbuzz",
- + # GTK pulls pangoft2, which requires HarfBuzz symbols. Since we
- + # link our own HarfBuzz, avoid mixing symbols from system HarfBuzz
- + # and own ones, hence the dependency to harfbuzz-ng here.
- + "//third_party/harfbuzz-ng",
- "//ui/aura",
- "//ui/base",
- "//ui/base/ime",
- diff --git i/content/browser/gpu/gpu_process_host.cc w/content/browser/gpu/gpu_process_host.cc
- index 029fc58f0e..7a17b52157 100644
- --- i/content/browser/gpu/gpu_process_host.cc
- +++ w/content/browser/gpu/gpu_process_host.cc
- @@ -120,7 +120,7 @@ static const char* const kSwitchNames[] = {
- switches::kDisableGLExtensions,
- switches::kDisableLogging,
- switches::kDisableShaderNameHashing,
- -#if BUILDFLAG(ENABLE_WEBRTC)
- +#if BUILDFLAG(ENABLE_WEBRTC) && !defined(OS_LINUX)
- switches::kDisableWebRtcHWEncoding,
- #endif
- #if defined(OS_WIN)
- diff --git i/content/browser/renderer_host/media/video_capture_browsertest.cc w/content/browser/renderer_host/media/video_capture_browsertest.cc
- index 40529f778a..1fe3fa53f6 100644
- --- i/content/browser/renderer_host/media/video_capture_browsertest.cc
- +++ w/content/browser/renderer_host/media/video_capture_browsertest.cc
- @@ -164,8 +164,13 @@ class VideoCaptureBrowserTest : public ContentBrowserTest,
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kUseFakeJpegDecodeAccelerator);
- } else {
- +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
- + base::CommandLine::ForCurrentProcess()->AppendSwitch(
- + switches::kEnableAcceleratedMjpegDecode);
- +#else
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kDisableAcceleratedMjpegDecode);
- +#endif
- }
- }
- diff --git i/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc w/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
- index 2be279b50e..c96432b97e 100644
- --- i/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
- +++ w/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
- @@ -65,15 +65,21 @@ void VideoCaptureGpuJpegDecoder::Initialize() {
- bool is_platform_supported =
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseFakeJpegDecodeAccelerator);
- -#if defined(OS_CHROMEOS)
- - // Non-ChromeOS platforms do not support HW JPEG decode now. Do not establish
- - // gpu channel to avoid introducing overhead.
- +#if !defined(OS_ANDROID) && defined(OS_LINUX)
- + // Non-ChromeOS or Non-Linux platforms do not support HW JPEG decode now. Do
- + // not establish gpu channel to avoid introducing overhead.
- is_platform_supported = true;
- #endif
- if (!is_platform_supported ||
- +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
- + !base::CommandLine::ForCurrentProcess()->HasSwitch(
- + switches::kEnableAcceleratedMjpegDecode)
- +#else
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- - switches::kDisableAcceleratedMjpegDecode)) {
- + switches::kDisableAcceleratedMjpegDecode)
- +#endif
- + ) {
- decoder_status_ = FAILED;
- RecordInitDecodeUMA_Locked();
- return;
- diff --git i/content/browser/renderer_host/render_process_host_impl.cc w/content/browser/renderer_host/render_process_host_impl.cc
- index 62d007c253..4eb04ecfdb 100644
- --- i/content/browser/renderer_host/render_process_host_impl.cc
- +++ w/content/browser/renderer_host/render_process_host_impl.cc
- @@ -2531,7 +2531,11 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
- switches::kDefaultTileHeight,
- switches::kDisable2dCanvasImageChromium,
- switches::kDisableAcceleratedJpegDecoding,
- +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- + switches::kEnableAcceleratedVideo,
- +#else
- switches::kDisableAcceleratedVideoDecode,
- +#endif
- switches::kDisableBackgroundTimerThrottling,
- switches::kDisableBreakpad,
- switches::kDisableCompositorUkmForTests,
- @@ -2664,8 +2668,10 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
- switches::kDisableMojoRenderer,
- #endif
- #if BUILDFLAG(ENABLE_WEBRTC)
- +#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
- switches::kDisableWebRtcHWDecoding,
- switches::kDisableWebRtcHWEncoding,
- +#endif
- switches::kEnableWebRtcSrtpAesGcm,
- switches::kEnableWebRtcSrtpEncryptedHeaders,
- switches::kEnableWebRtcStunOrigin,
- diff --git i/content/browser/webrtc/webrtc_media_recorder_browsertest.cc w/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
- index a92e78aec1..66a186d5f9 100644
- --- i/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
- +++ w/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
- @@ -58,7 +58,12 @@ class WebRtcMediaRecorderTest
- return;
- // This flag is also used for encoding, https://crbug.com/616640.
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- - switches::kDisableAcceleratedVideoDecode);
- +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- + switches::kEnableAcceleratedVideo
- +#else
- + switches::kDisableAcceleratedVideoDecode
- +#endif
- + );
- }
- private:
- diff --git i/content/gpu/BUILD.gn w/content/gpu/BUILD.gn
- index 4c50c53718..11727c98af 100644
- --- i/content/gpu/BUILD.gn
- +++ w/content/gpu/BUILD.gn
- @@ -8,6 +8,16 @@ import("//gpu/vulkan/features.gni")
- import("//media/media_options.gni")
- import("//ui/ozone/ozone.gni")
- +# Unfortunately, using public_configs from media/gpu breaks unbundling
- +import("//media/gpu/args.gni")
- +if (is_desktop_linux && use_vaapi) {
- + import("//build/config/linux/pkg_config.gni")
- +
- + pkg_config("libva_config") {
- + packages = [ "libva" ]
- + }
- +}
- +
- # See //content/BUILD.gn for how this works.
- group("gpu") {
- visibility = [ "//content/*" ] # This is an internal content API.
- @@ -49,7 +59,6 @@ target(link_target_type, "gpu_sources") {
- ]
- configs += [ "//content:content_implementation" ]
- -
- deps = [
- "//base",
- "//base/third_party/dynamic_annotations",
- @@ -125,4 +134,8 @@ target(link_target_type, "gpu_sources") {
- if (is_desktop_linux && (!is_chromecast || is_cast_desktop_build)) {
- configs += [ "//build/config/linux/dri" ]
- }
- +
- + if (is_desktop_linux) {
- + public_configs = [ ":libva_config" ]
- + }
- }
- diff --git i/content/gpu/gpu_main.cc w/content/gpu/gpu_main.cc
- index 7385416b66..615adf5d9a 100644
- --- i/content/gpu/gpu_main.cc
- +++ w/content/gpu/gpu_main.cc
- @@ -274,7 +274,7 @@ int GpuMain(const MainFunctionParams& parameters) {
- base::PlatformThread::SetName("CrGpuMain");
- -#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
- +#if defined(OS_LINUX)
- // Set thread priority before sandbox initialization.
- base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
- #endif
- @@ -306,7 +306,7 @@ int GpuMain(const MainFunctionParams& parameters) {
- 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
- diff --git i/content/public/browser/gpu_utils.cc w/content/public/browser/gpu_utils.cc
- index bb72dffb57..517c277c74 100644
- --- i/content/public/browser/gpu_utils.cc
- +++ w/content/public/browser/gpu_utils.cc
- @@ -7,6 +7,7 @@
- #include "base/command_line.h"
- #include "base/single_thread_task_runner.h"
- #include "base/strings/string_number_conversions.h"
- +#include "build/build_config.h"
- #include "content/browser/gpu/gpu_process_host.h"
- #include "content/public/common/content_features.h"
- #include "content/public/common/content_switches.h"
- @@ -55,10 +56,10 @@ const gpu::GpuPreferences GetGpuPreferencesFromCommandLine() {
- gpu_preferences.in_process_gpu =
- command_line->HasSwitch(switches::kInProcessGPU);
- gpu_preferences.disable_accelerated_video_decode =
- - command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
- + !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
- gpu_preferences.disable_accelerated_video_encode =
- - command_line->HasSwitch(switches::kDisableAcceleratedVideoEncode);
- -#if BUILDFLAG(ENABLE_WEBRTC)
- + !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
- +#if BUILDFLAG(ENABLE_WEBRTC) && (!defined(OS_LINUX) || defined(OS_CHROMEOS))
- gpu_preferences.disable_web_rtc_hw_encoding =
- command_line->HasSwitch(switches::kDisableWebRtcHWEncoding);
- #endif
- diff --git i/content/public/common/content_switches.cc w/content/public/common/content_switches.cc
- index 9493605f6b..5f0069462a 100644
- --- i/content/public/common/content_switches.cc
- +++ w/content/public/common/content_switches.cc
- @@ -78,12 +78,21 @@ const char kDisable3DAPIs[] = "disable-3d-apis";
- // Disable gpu-accelerated 2d canvas.
- const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas";
- -
- +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- +// Enable hardware accelerated mjpeg decode on linux
- +const char kEnableAcceleratedMjpegDecode[] = "enable-accelerated-mjpeg-decode";
- +#else
- // Disable hardware acceleration of mjpeg decode for captured frame, where
- // available.
- const char kDisableAcceleratedMjpegDecode[] =
- "disable-accelerated-mjpeg-decode";
- +#endif
- +#if defined(OS_LINUX)
- +// Enables hardware acceleration of video for Linux only. VA-API driver
- +// is required to be present on the system installation.
- +const char kEnableAcceleratedVideo[] = "enable-accelerated-video";
- +#endif
- // Disables hardware acceleration of video decode, where available.
- const char kDisableAcceleratedVideoDecode[] =
- "disable-accelerated-video-decode";
- @@ -869,11 +878,13 @@ const char kZygoteProcess[] = "zygote";
- // ignores this switch on its stable and beta channels.
- const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
- +#if defined(OS_CHROMEOS)
- // Disables HW decode acceleration for WebRTC.
- const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding";
- // Disables HW encode acceleration for WebRTC.
- const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
- +#endif
- // 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 i/content/public/common/content_switches.h w/content/public/common/content_switches.h
- index 4444504fe8..4eb49cc2bf 100644
- --- i/content/public/common/content_switches.h
- +++ w/content/public/common/content_switches.h
- @@ -33,7 +33,11 @@ CONTENT_EXPORT extern const char kDisable2dCanvasImageChromium[];
- CONTENT_EXPORT extern const char kDisable3DAPIs[];
- CONTENT_EXPORT extern const char kDisableAccelerated2dCanvas[];
- CONTENT_EXPORT extern const char kDisableAcceleratedJpegDecoding[];
- +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- +CONTENT_EXPORT extern const char kEnableAcceleratedMjpegDecode[];
- +#else
- CONTENT_EXPORT extern const char kDisableAcceleratedMjpegDecode[];
- +#endif
- CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[];
- CONTENT_EXPORT extern const char kDisableAcceleratedVideoEncode[];
- CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
- @@ -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 kEnableAutomation[];
- CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
- @@ -240,8 +247,10 @@ CONTENT_EXPORT extern const char kZygoteProcess[];
- #if BUILDFLAG(ENABLE_WEBRTC)
- CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
- +#if defined(OS_CHROMEOS)
- CONTENT_EXPORT extern const char kDisableWebRtcHWDecoding[];
- CONTENT_EXPORT extern const char kDisableWebRtcHWEncoding[];
- +#endif
- CONTENT_EXPORT extern const char kEnableWebRtcSrtpAesGcm[];
- CONTENT_EXPORT extern const char kEnableWebRtcSrtpEncryptedHeaders[];
- CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
- diff --git i/content/renderer/media/webrtc/peer_connection_dependency_factory.cc w/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
- index 7a77385849..a7a37cd8ec 100644
- --- i/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
- +++ w/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
- @@ -245,10 +245,14 @@ void PeerConnectionDependencyFactory::InitializeSignalingThread(
- const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
- if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
- +#if BUILDFLAG(ENABLE_WEBRTC) && (!defined(OS_LINUX) || defined(OS_CHROMEOS))
- if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding))
- +#endif
- decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
- -
- - if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) {
- +#if BUILDFLAG(ENABLE_WEBRTC) && (!defined(OS_LINUX) || defined(OS_CHROMEOS))
- + if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
- +#endif
- + {
- encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
- }
- }
- diff --git i/content/renderer/render_thread_impl.cc w/content/renderer/render_thread_impl.cc
- index 683d97a898..e2d91ac104 100644
- --- i/content/renderer/render_thread_impl.cc
- +++ w/content/renderer/render_thread_impl.cc
- @@ -1466,7 +1466,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl::GetGpuFactories() {
- scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
- GetMediaThreadTaskRunner();
- const bool enable_video_accelerator =
- - !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) &&
- + (cmd_line->HasSwitch(switches::kEnableAcceleratedVideo)) &&
- (gpu_channel_host->gpu_feature_info()
- .status_values[gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE] ==
- gpu::kGpuFeatureStatusEnabled);
- diff --git i/gpu/config/software_rendering_list.json w/gpu/config/software_rendering_list.json
- index b1679dcf4e..563b3ebb87 100644
- --- i/gpu/config/software_rendering_list.json
- +++ w/gpu/config/software_rendering_list.json
- @@ -372,17 +372,6 @@
- "all"
- ]
- },
- - {
- - "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",
- diff --git i/media/gpu/BUILD.gn w/media/gpu/BUILD.gn
- index ecd72bd147..e2c2bc3d24 100644
- --- i/media/gpu/BUILD.gn
- +++ w/media/gpu/BUILD.gn
- @@ -24,6 +24,14 @@ if (is_mac) {
- import("//build/config/mac/mac_sdk.gni")
- }
- +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 = "vaapi/va_stub_header.fragment"
- @@ -303,6 +311,9 @@ component("gpu") {
- "v4l2/tegra_v4l2_device.h",
- ]
- }
- + if (is_desktop_linux) {
- + public_configs = [ ":libva_config" ]
- + }
- }
- if (use_vaapi) {
- diff --git i/media/gpu/gpu_video_decode_accelerator_factory.cc w/media/gpu/gpu_video_decode_accelerator_factory.cc
- index 0a84cf39c8..03cc927728 100644
- --- i/media/gpu/gpu_video_decode_accelerator_factory.cc
- +++ w/media/gpu/gpu_video_decode_accelerator_factory.cc
- @@ -88,6 +88,7 @@ GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities(
- // profile (instead of calculating a superset).
- // TODO(posciak,henryhsu): improve this so that we choose a superset of
- // resolutions and other supported profile parameters.
- + DVLOG(1) << "Get Supported profiles";
- #if defined(OS_WIN)
- capabilities.supported_profiles =
- DXVAVideoDecodeAccelerator::GetSupportedProfiles(gpu_preferences,
- diff --git i/media/gpu/vaapi/vaapi_wrapper.cc w/media/gpu/vaapi/vaapi_wrapper.cc
- index bc3d735e78..d72cede9db 100644
- --- i/media/gpu/vaapi/vaapi_wrapper.cc
- +++ w/media/gpu/vaapi/vaapi_wrapper.cc
- @@ -1169,6 +1169,7 @@ bool VaapiWrapper::BlitSurface(
- // static
- void VaapiWrapper::PreSandboxInitialization() {
- VADisplayState::PreSandboxInitialization();
- + VASupportedProfiles::Get(); // dlopen all necessary libraries
- }
- VaapiWrapper::VaapiWrapper()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement