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

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: address comments from gab #10 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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 1021
1022 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags); 1022 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags);
1023 if (exe_path.empty()) 1023 if (exe_path.empty())
1024 return false; 1024 return false;
1025 1025
1026 base::CommandLine* cmd_line = new base::CommandLine(exe_path); 1026 base::CommandLine* cmd_line = new base::CommandLine(exe_path);
1027 #endif 1027 #endif
1028 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); 1028 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess);
1029 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); 1029 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
1030 1030
1031 #if defined(OS_WIN)
1032 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument())
1033 cmd_line->AppendArg(switches::kPrefetchArgumentGpu);
1034 #endif // defined(OS_WIN)
1035
1031 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED) 1036 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED)
1032 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); 1037 cmd_line->AppendSwitch(switches::kDisableGpuSandbox);
1033 1038
1034 // If you want a browser command-line switch passed to the GPU process 1039 // If you want a browser command-line switch passed to the GPU process
1035 // you need to add it to |kSwitchNames| at the beginning of this file. 1040 // you need to add it to |kSwitchNames| at the beginning of this file.
1036 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, 1041 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
1037 arraysize(kSwitchNames)); 1042 arraysize(kSwitchNames));
1038 cmd_line->CopySwitchesFrom( 1043 cmd_line->CopySwitchesFrom(
1039 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches); 1044 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches);
1040 cmd_line->CopySwitchesFrom( 1045 cmd_line->CopySwitchesFrom(
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1226 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1222 ClientIdToShaderCacheMap::iterator iter = 1227 ClientIdToShaderCacheMap::iterator iter =
1223 client_id_to_shader_cache_.find(client_id); 1228 client_id_to_shader_cache_.find(client_id);
1224 // If the cache doesn't exist then this is an off the record profile. 1229 // If the cache doesn't exist then this is an off the record profile.
1225 if (iter == client_id_to_shader_cache_.end()) 1230 if (iter == client_id_to_shader_cache_.end())
1226 return; 1231 return;
1227 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1232 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1228 } 1233 }
1229 1234
1230 } // namespace content 1235 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698