Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 1885023002: Set GpuPreferences correctly in GpuDataManagerImplPrivate::AppendGpuCommandLine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.h ('k') | content/browser/gpu/gpu_data_manager_impl_private_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698