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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 #else | 987 #else |
988 int child_flags = ChildProcessHost::CHILD_NORMAL; | 988 int child_flags = ChildProcessHost::CHILD_NORMAL; |
989 #endif | 989 #endif |
990 | 990 |
991 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags); | 991 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags); |
992 if (exe_path.empty()) | 992 if (exe_path.empty()) |
993 return false; | 993 return false; |
994 | 994 |
995 base::CommandLine* cmd_line = new base::CommandLine(exe_path); | 995 base::CommandLine* cmd_line = new base::CommandLine(exe_path); |
996 #endif | 996 #endif |
| 997 ChildProcessHostImpl::CopyEnableDisableFeatureFlags(cmd_line); |
997 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); | 998 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); |
998 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 999 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
999 cmd_line->AppendSwitchASCII(switches::kMojoApplicationChannelToken, | 1000 cmd_line->AppendSwitchASCII(switches::kMojoApplicationChannelToken, |
1000 mojo_application_host_->GetToken()); | 1001 mojo_application_host_->GetToken()); |
1001 | 1002 |
1002 #if defined(OS_WIN) | 1003 #if defined(OS_WIN) |
1003 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) | 1004 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) |
1004 cmd_line->AppendArg(switches::kPrefetchArgumentGpu); | 1005 cmd_line->AppendArg(switches::kPrefetchArgumentGpu); |
1005 #endif // defined(OS_WIN) | 1006 #endif // defined(OS_WIN) |
1006 | 1007 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1185 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1185 ClientIdToShaderCacheMap::iterator iter = | 1186 ClientIdToShaderCacheMap::iterator iter = |
1186 client_id_to_shader_cache_.find(client_id); | 1187 client_id_to_shader_cache_.find(client_id); |
1187 // 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. |
1188 if (iter == client_id_to_shader_cache_.end()) | 1189 if (iter == client_id_to_shader_cache_.end()) |
1189 return; | 1190 return; |
1190 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1191 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1191 } | 1192 } |
1192 | 1193 |
1193 } // namespace content | 1194 } // namespace content |
OLD | NEW |