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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 2075693002: Always use a /prefetch:# switch when launching a process on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 1001
1002 base::CommandLine* cmd_line = new base::CommandLine(exe_path); 1002 base::CommandLine* cmd_line = new base::CommandLine(exe_path);
1003 #endif 1003 #endif
1004 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); 1004 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess);
1005 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); 1005 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
1006 cmd_line->AppendSwitchASCII(switches::kMojoApplicationChannelToken, 1006 cmd_line->AppendSwitchASCII(switches::kMojoApplicationChannelToken,
1007 mojo_application_host_->GetToken()); 1007 mojo_application_host_->GetToken());
1008 BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(cmd_line); 1008 BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(cmd_line);
1009 1009
1010 #if defined(OS_WIN) 1010 #if defined(OS_WIN)
1011 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) 1011 cmd_line->AppendArg(switches::kPrefetchArgumentGpu);
1012 cmd_line->AppendArg(switches::kPrefetchArgumentGpu);
1013 #endif // defined(OS_WIN) 1012 #endif // defined(OS_WIN)
1014 1013
1015 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED) 1014 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED)
1016 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); 1015 cmd_line->AppendSwitch(switches::kDisableGpuSandbox);
1017 1016
1018 // TODO(penghuang): Replace all GPU related switches with GpuPreferences. 1017 // TODO(penghuang): Replace all GPU related switches with GpuPreferences.
1019 // https://crbug.com/590825 1018 // https://crbug.com/590825
1020 // If you want a browser command-line switch passed to the GPU process 1019 // If you want a browser command-line switch passed to the GPU process
1021 // you need to add it to |kSwitchNames| at the beginning of this file. 1020 // you need to add it to |kSwitchNames| at the beginning of this file.
1022 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, 1021 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1191 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1193 ClientIdToShaderCacheMap::iterator iter = 1192 ClientIdToShaderCacheMap::iterator iter =
1194 client_id_to_shader_cache_.find(client_id); 1193 client_id_to_shader_cache_.find(client_id);
1195 // If the cache doesn't exist then this is an off the record profile. 1194 // If the cache doesn't exist then this is an off the record profile.
1196 if (iter == client_id_to_shader_cache_.end()) 1195 if (iter == client_id_to_shader_cache_.end())
1197 return; 1196 return;
1198 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1197 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1199 } 1198 }
1200 1199
1201 } // namespace content 1200 } // namespace content
OLDNEW
« no previous file with comments | « components/startup_metric_utils/common/pre_read_field_trial_utils_win.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698