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

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

Issue 1612663002: Use a valid /prefetch argument when launching a process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bit
Patch Set: rebase + prefetch argument for crashpad Created 4 years, 10 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 <utility> 9 #include <utility>
10 10
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 989
990 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags); 990 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags);
991 if (exe_path.empty()) 991 if (exe_path.empty())
992 return false; 992 return false;
993 993
994 base::CommandLine* cmd_line = new base::CommandLine(exe_path); 994 base::CommandLine* cmd_line = new base::CommandLine(exe_path);
995 #endif 995 #endif
996 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); 996 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess);
997 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); 997 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
998 998
999 #if defined(OS_WIN)
1000 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument())
1001 cmd_line->AppendArg(switches::kPrefetchArgumentGpu);
1002 #endif // defined(OS_WIN)
1003
999 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED) 1004 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED)
1000 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); 1005 cmd_line->AppendSwitch(switches::kDisableGpuSandbox);
1001 1006
1002 // If you want a browser command-line switch passed to the GPU process 1007 // If you want a browser command-line switch passed to the GPU process
1003 // you need to add it to |kSwitchNames| at the beginning of this file. 1008 // you need to add it to |kSwitchNames| at the beginning of this file.
1004 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, 1009 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
1005 arraysize(kSwitchNames)); 1010 arraysize(kSwitchNames));
1006 cmd_line->CopySwitchesFrom( 1011 cmd_line->CopySwitchesFrom(
1007 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches); 1012 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches);
1008 cmd_line->CopySwitchesFrom( 1013 cmd_line->CopySwitchesFrom(
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1185 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1181 ClientIdToShaderCacheMap::iterator iter = 1186 ClientIdToShaderCacheMap::iterator iter =
1182 client_id_to_shader_cache_.find(client_id); 1187 client_id_to_shader_cache_.find(client_id);
1183 // If the cache doesn't exist then this is an off the record profile. 1188 // If the cache doesn't exist then this is an off the record profile.
1184 if (iter == client_id_to_shader_cache_.end()) 1189 if (iter == client_id_to_shader_cache_.end())
1185 return; 1190 return;
1186 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1191 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1187 } 1192 }
1188 1193
1189 } // namespace content 1194 } // namespace content
OLDNEW
« no previous file with comments | « components/startup_metric_utils/common/pre_read_field_trial_utils_win.cc ('k') | content/browser/plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698