| Index: 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 a4ca614c1a8dfd1296bbc906abb4290fe8bf2c93..496c2ed6f6a1fcd475364c207a9a676eb1910eb7 100644
|
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| @@ -26,6 +26,7 @@
|
| #include "content/public/common/content_constants.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/common/web_preferences.h"
|
| +#include "gpu/command_buffer/service/gpu_preferences.h"
|
| #include "gpu/command_buffer/service/gpu_switches.h"
|
| #include "gpu/config/gpu_control_list_jsons.h"
|
| #include "gpu/config/gpu_driver_bug_workaround_type.h"
|
| @@ -556,7 +557,7 @@ void GpuDataManagerImplPrivate::Initialize() {
|
| if (command_line->HasSwitch(switches::kSingleProcess) ||
|
| command_line->HasSwitch(switches::kInProcessGPU)) {
|
| command_line->AppendSwitch(switches::kDisableGpuWatchdog);
|
| - AppendGpuCommandLine(command_line);
|
| + AppendGpuCommandLine(command_line, nullptr);
|
| }
|
| }
|
|
|
| @@ -654,7 +655,8 @@ void GpuDataManagerImplPrivate::AppendRendererCommandLine(
|
| }
|
|
|
| void GpuDataManagerImplPrivate::AppendGpuCommandLine(
|
| - base::CommandLine* command_line) const {
|
| + base::CommandLine* command_line,
|
| + gpu::GpuPreferences* gpu_preferences) const {
|
| DCHECK(command_line);
|
|
|
| std::string use_gl =
|
| @@ -698,12 +700,20 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine(
|
| }
|
|
|
| if (ShouldDisableAcceleratedVideoDecode(command_line)) {
|
| - command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
|
| + if (gpu_preferences) {
|
| + gpu_preferences->disable_accelerated_video_decode = true;
|
| + } else {
|
| + command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
|
| + }
|
| }
|
| #if defined(ENABLE_WEBRTC)
|
| if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) &&
|
| !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) {
|
| - command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding);
|
| + if (gpu_preferences) {
|
| + gpu_preferences->disable_web_rtc_hw_encoding = true;
|
| + } else {
|
| + command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding);
|
| + }
|
| }
|
| #endif
|
|
|
|
|