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

Unified Diff: content/browser/gpu/gpu_process_host.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
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 de21595224043f4fcb9b25cd6a96c70c070c0be4..2e30fecd9c44e22d528276daa8853c52a2f4176d 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -550,13 +550,14 @@ bool GpuProcessHost::Init() {
if (!SetupMojo())
return false;
+ gpu::GpuPreferences gpu_preferences = GetGpuPreferencesFromCommandLine();
if (in_process_) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(g_gpu_main_thread_factory);
in_process_gpu_thread_.reset(
g_gpu_main_thread_factory(InProcessChildThreadParams(
channel_id, base::MessageLoop::current()->task_runner()),
- GetGpuPreferencesFromCommandLine()));
+ gpu_preferences));
base::Thread::Options options;
#if defined(OS_WIN)
// WGL needs to create its own window and pump messages on it.
@@ -568,11 +569,11 @@ bool GpuProcessHost::Init() {
in_process_gpu_thread_->StartWithOptions(options);
OnProcessLaunched(); // Fake a callback that the process is ready.
- } else if (!LaunchGpuProcess(channel_id)) {
+ } else if (!LaunchGpuProcess(channel_id, &gpu_preferences)) {
return false;
}
- if (!Send(new GpuMsg_Initialize(GetGpuPreferencesFromCommandLine())))
+ if (!Send(new GpuMsg_Initialize(gpu_preferences)))
return false;
return true;
@@ -949,7 +950,8 @@ void GpuProcessHost::StopGpuProcess() {
Send(new GpuMsg_Finalize());
}
-bool GpuProcessHost::LaunchGpuProcess(const std::string& channel_id) {
+bool GpuProcessHost::LaunchGpuProcess(const std::string& channel_id,
+ gpu::GpuPreferences* gpu_preferences) {
if (!(gpu_enabled_ &&
GpuDataManagerImpl::GetInstance()->ShouldUseSwiftShader()) &&
!hardware_gpu_enabled_) {
@@ -1007,8 +1009,8 @@ bool GpuProcessHost::LaunchGpuProcess(const std::string& channel_id) {
GetContentClient()->browser()->AppendExtraCommandLineSwitches(
cmd_line, process_->GetData().id);
- GpuDataManagerImpl::GetInstance()->AppendGpuCommandLine(cmd_line);
-
+ GpuDataManagerImpl::GetInstance()->AppendGpuCommandLine(cmd_line,
+ gpu_preferences);
if (cmd_line->HasSwitch(switches::kUseGL)) {
swiftshader_rendering_ =
(cmd_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader");
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698