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 17 matching lines...) Expand all Loading... |
28 #include "content/common/in_process_child_thread_params.h" | 28 #include "content/common/in_process_child_thread_params.h" |
29 #include "content/common/view_messages.h" | 29 #include "content/common/view_messages.h" |
30 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
31 #include "content/public/browser/content_browser_client.h" | 31 #include "content/public/browser/content_browser_client.h" |
32 #include "content/public/browser/render_process_host.h" | 32 #include "content/public/browser/render_process_host.h" |
33 #include "content/public/browser/render_widget_host_view.h" | 33 #include "content/public/browser/render_widget_host_view.h" |
34 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" | 34 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" |
35 #include "content/public/common/content_client.h" | 35 #include "content/public/common/content_client.h" |
36 #include "content/public/common/content_switches.h" | 36 #include "content/public/common/content_switches.h" |
37 #include "content/public/common/result_codes.h" | 37 #include "content/public/common/result_codes.h" |
| 38 #include "content/public/common/sandbox_type.h" |
38 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 39 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
39 #include "gpu/command_buffer/service/gpu_switches.h" | 40 #include "gpu/command_buffer/service/gpu_switches.h" |
40 #include "ipc/ipc_channel_handle.h" | 41 #include "ipc/ipc_channel_handle.h" |
41 #include "ipc/ipc_switches.h" | 42 #include "ipc/ipc_switches.h" |
42 #include "ipc/message_filter.h" | 43 #include "ipc/message_filter.h" |
43 #include "media/base/media_switches.h" | 44 #include "media/base/media_switches.h" |
44 #include "ui/base/ui_base_switches.h" | 45 #include "ui/base/ui_base_switches.h" |
45 #include "ui/events/latency_info.h" | 46 #include "ui/events/latency_info.h" |
46 #include "ui/gl/gl_switches.h" | 47 #include "ui/gl/gl_switches.h" |
47 | 48 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 return; | 258 return; |
258 } | 259 } |
259 } | 260 } |
260 } | 261 } |
261 } | 262 } |
262 #elif defined(OS_POSIX) | 263 #elif defined(OS_POSIX) |
263 | 264 |
264 base::ScopedFD TakeIpcFd() override { return ipc_fd_.Pass(); } | 265 base::ScopedFD TakeIpcFd() override { return ipc_fd_.Pass(); } |
265 #endif // OS_WIN | 266 #endif // OS_WIN |
266 | 267 |
| 268 SandboxType GetSandboxType() override { |
| 269 return SANDBOX_TYPE_GPU; |
| 270 } |
| 271 |
267 private: | 272 private: |
268 #if defined(OS_WIN) | 273 #if defined(OS_WIN) |
269 base::CommandLine* cmd_line_; | 274 base::CommandLine* cmd_line_; |
270 #elif defined(OS_POSIX) | 275 #elif defined(OS_POSIX) |
271 base::ScopedFD ipc_fd_; | 276 base::ScopedFD ipc_fd_; |
272 #endif // OS_WIN | 277 #endif // OS_WIN |
273 }; | 278 }; |
274 | 279 |
275 } // anonymous namespace | 280 } // anonymous namespace |
276 | 281 |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1118 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1114 ClientIdToShaderCacheMap::iterator iter = | 1119 ClientIdToShaderCacheMap::iterator iter = |
1115 client_id_to_shader_cache_.find(client_id); | 1120 client_id_to_shader_cache_.find(client_id); |
1116 // If the cache doesn't exist then this is an off the record profile. | 1121 // If the cache doesn't exist then this is an off the record profile. |
1117 if (iter == client_id_to_shader_cache_.end()) | 1122 if (iter == client_id_to_shader_cache_.end()) |
1118 return; | 1123 return; |
1119 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1124 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1120 } | 1125 } |
1121 | 1126 |
1122 } // namespace content | 1127 } // namespace content |
OLD | NEW |