| OLD | NEW |
| 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 #else | 956 #else |
| 957 int child_flags = ChildProcessHost::CHILD_NORMAL; | 957 int child_flags = ChildProcessHost::CHILD_NORMAL; |
| 958 #endif | 958 #endif |
| 959 | 959 |
| 960 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags); | 960 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags); |
| 961 if (exe_path.empty()) | 961 if (exe_path.empty()) |
| 962 return false; | 962 return false; |
| 963 | 963 |
| 964 base::CommandLine* cmd_line = new base::CommandLine(exe_path); | 964 base::CommandLine* cmd_line = new base::CommandLine(exe_path); |
| 965 #endif | 965 #endif |
| 966 BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(cmd_line); |
| 966 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); | 967 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); |
| 967 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 968 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
| 968 cmd_line->AppendSwitchASCII(switches::kMojoApplicationChannelToken, | 969 cmd_line->AppendSwitchASCII(switches::kMojoApplicationChannelToken, |
| 969 mojo_application_host_->GetToken()); | 970 mojo_application_host_->GetToken()); |
| 970 | 971 |
| 971 #if defined(OS_WIN) | 972 #if defined(OS_WIN) |
| 972 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) | 973 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) |
| 973 cmd_line->AppendArg(switches::kPrefetchArgumentGpu); | 974 cmd_line->AppendArg(switches::kPrefetchArgumentGpu); |
| 974 #endif // defined(OS_WIN) | 975 #endif // defined(OS_WIN) |
| 975 | 976 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1151 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1151 ClientIdToShaderCacheMap::iterator iter = | 1152 ClientIdToShaderCacheMap::iterator iter = |
| 1152 client_id_to_shader_cache_.find(client_id); | 1153 client_id_to_shader_cache_.find(client_id); |
| 1153 // If the cache doesn't exist then this is an off the record profile. | 1154 // If the cache doesn't exist then this is an off the record profile. |
| 1154 if (iter == client_id_to_shader_cache_.end()) | 1155 if (iter == client_id_to_shader_cache_.end()) |
| 1155 return; | 1156 return; |
| 1156 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1157 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1157 } | 1158 } |
| 1158 | 1159 |
| 1159 } // namespace content | 1160 } // namespace content |
| OLD | NEW |