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 "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 | 1155 |
1156 // If specified, prepend a launcher program to the command line. | 1156 // If specified, prepend a launcher program to the command line. |
1157 if (!gpu_launcher.empty()) | 1157 if (!gpu_launcher.empty()) |
1158 cmd_line->PrependWrapper(gpu_launcher); | 1158 cmd_line->PrependWrapper(gpu_launcher); |
1159 | 1159 |
1160 process_->Launch( | 1160 process_->Launch( |
1161 #if defined(OS_WIN) | 1161 #if defined(OS_WIN) |
1162 new GpuSandboxedProcessLauncherDelegate(cmd_line), | 1162 new GpuSandboxedProcessLauncherDelegate(cmd_line), |
1163 #elif defined(OS_POSIX) | 1163 #elif defined(OS_POSIX) |
1164 false, | 1164 false, |
1165 base::EnvironmentVector(), | 1165 base::EnvironmentMap(), |
1166 #endif | 1166 #endif |
1167 cmd_line); | 1167 cmd_line); |
1168 process_launched_ = true; | 1168 process_launched_ = true; |
1169 | 1169 |
1170 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", | 1170 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", |
1171 LAUNCHED, GPU_PROCESS_LIFETIME_EVENT_MAX); | 1171 LAUNCHED, GPU_PROCESS_LIFETIME_EVENT_MAX); |
1172 return true; | 1172 return true; |
1173 } | 1173 } |
1174 | 1174 |
1175 void GpuProcessHost::SendOutstandingReplies() { | 1175 void GpuProcessHost::SendOutstandingReplies() { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1243 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1244 ClientIdToShaderCacheMap::iterator iter = | 1244 ClientIdToShaderCacheMap::iterator iter = |
1245 client_id_to_shader_cache_.find(client_id); | 1245 client_id_to_shader_cache_.find(client_id); |
1246 // If the cache doesn't exist then this is an off the record profile. | 1246 // If the cache doesn't exist then this is an off the record profile. |
1247 if (iter == client_id_to_shader_cache_.end()) | 1247 if (iter == client_id_to_shader_cache_.end()) |
1248 return; | 1248 return; |
1249 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1249 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1250 } | 1250 } |
1251 | 1251 |
1252 } // namespace content | 1252 } // namespace content |
OLD | NEW |