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/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "content/browser/renderer_host/render_widget_helper.h" | 23 #include "content/browser/renderer_host/render_widget_helper.h" |
24 #include "content/browser/renderer_host/render_widget_host_impl.h" | 24 #include "content/browser/renderer_host/render_widget_host_impl.h" |
25 #include "content/common/child_process_host_impl.h" | 25 #include "content/common/child_process_host_impl.h" |
26 #include "content/common/gpu/gpu_messages.h" | 26 #include "content/common/gpu/gpu_messages.h" |
27 #include "content/common/view_messages.h" | 27 #include "content/common/view_messages.h" |
28 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" | 28 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" |
29 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
30 #include "content/public/browser/content_browser_client.h" | 30 #include "content/public/browser/content_browser_client.h" |
31 #include "content/public/browser/render_process_host.h" | 31 #include "content/public/browser/render_process_host.h" |
32 #include "content/public/browser/render_widget_host_view.h" | 32 #include "content/public/browser/render_widget_host_view.h" |
| 33 #include "content/public/common/child_process_host_delegate.h" |
33 #include "content/public/common/content_client.h" | 34 #include "content/public/common/content_client.h" |
34 #include "content/public/common/content_switches.h" | 35 #include "content/public/common/content_switches.h" |
35 #include "content/public/common/result_codes.h" | 36 #include "content/public/common/result_codes.h" |
36 #include "gpu/command_buffer/service/gpu_switches.h" | 37 #include "gpu/command_buffer/service/gpu_switches.h" |
37 #include "ipc/ipc_channel_handle.h" | 38 #include "ipc/ipc_channel_handle.h" |
38 #include "ipc/ipc_switches.h" | 39 #include "ipc/ipc_switches.h" |
39 #include "ui/events/latency_info.h" | 40 #include "ui/events/latency_info.h" |
40 #include "ui/gl/gl_switches.h" | 41 #include "ui/gl/gl_switches.h" |
41 | 42 |
42 | 43 |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 UMA_HISTOGRAM_BOOLEAN("GPU.GPU.GPUProcessSoftwareRendering", | 1167 UMA_HISTOGRAM_BOOLEAN("GPU.GPU.GPUProcessSoftwareRendering", |
1167 swiftshader_rendering_); | 1168 swiftshader_rendering_); |
1168 | 1169 |
1169 // If specified, prepend a launcher program to the command line. | 1170 // If specified, prepend a launcher program to the command line. |
1170 if (!gpu_launcher.empty()) | 1171 if (!gpu_launcher.empty()) |
1171 cmd_line->PrependWrapper(gpu_launcher); | 1172 cmd_line->PrependWrapper(gpu_launcher); |
1172 | 1173 |
1173 process_->Launch( | 1174 process_->Launch( |
1174 #if defined(OS_WIN) | 1175 #if defined(OS_WIN) |
1175 new GpuSandboxedProcessLauncherDelegate(cmd_line), | 1176 new GpuSandboxedProcessLauncherDelegate(cmd_line), |
| 1177 false, |
1176 #elif defined(OS_POSIX) | 1178 #elif defined(OS_POSIX) |
1177 false, | 1179 false, |
1178 base::EnvironmentMap(), | 1180 base::EnvironmentMap(), |
1179 #endif | 1181 #endif |
1180 cmd_line); | 1182 cmd_line); |
1181 process_launched_ = true; | 1183 process_launched_ = true; |
1182 | 1184 |
1183 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", | 1185 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", |
1184 LAUNCHED, GPU_PROCESS_LIFETIME_EVENT_MAX); | 1186 LAUNCHED, GPU_PROCESS_LIFETIME_EVENT_MAX); |
1185 return true; | 1187 return true; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1258 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1257 ClientIdToShaderCacheMap::iterator iter = | 1259 ClientIdToShaderCacheMap::iterator iter = |
1258 client_id_to_shader_cache_.find(client_id); | 1260 client_id_to_shader_cache_.find(client_id); |
1259 // If the cache doesn't exist then this is an off the record profile. | 1261 // If the cache doesn't exist then this is an off the record profile. |
1260 if (iter == client_id_to_shader_cache_.end()) | 1262 if (iter == client_id_to_shader_cache_.end()) |
1261 return; | 1263 return; |
1262 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1264 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1263 } | 1265 } |
1264 | 1266 |
1265 } // namespace content | 1267 } // namespace content |
OLD | NEW |