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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 return; | 259 return; |
259 } | 260 } |
260 } | 261 } |
261 } | 262 } |
262 } | 263 } |
263 #elif defined(OS_POSIX) | 264 #elif defined(OS_POSIX) |
264 | 265 |
265 base::ScopedFD TakeIpcFd() override { return ipc_fd_.Pass(); } | 266 base::ScopedFD TakeIpcFd() override { return ipc_fd_.Pass(); } |
266 #endif // OS_WIN | 267 #endif // OS_WIN |
267 | 268 |
| 269 SandboxType GetSandboxType() override { |
| 270 return SANDBOX_TYPE_GPU; |
| 271 } |
| 272 |
268 private: | 273 private: |
269 #if defined(OS_WIN) | 274 #if defined(OS_WIN) |
270 base::CommandLine* cmd_line_; | 275 base::CommandLine* cmd_line_; |
271 #elif defined(OS_POSIX) | 276 #elif defined(OS_POSIX) |
272 base::ScopedFD ipc_fd_; | 277 base::ScopedFD ipc_fd_; |
273 #endif // OS_WIN | 278 #endif // OS_WIN |
274 }; | 279 }; |
275 | 280 |
276 } // anonymous namespace | 281 } // anonymous namespace |
277 | 282 |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1127 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1123 ClientIdToShaderCacheMap::iterator iter = | 1128 ClientIdToShaderCacheMap::iterator iter = |
1124 client_id_to_shader_cache_.find(client_id); | 1129 client_id_to_shader_cache_.find(client_id); |
1125 // If the cache doesn't exist then this is an off the record profile. | 1130 // If the cache doesn't exist then this is an off the record profile. |
1126 if (iter == client_id_to_shader_cache_.end()) | 1131 if (iter == client_id_to_shader_cache_.end()) |
1127 return; | 1132 return; |
1128 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1133 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1129 } | 1134 } |
1130 | 1135 |
1131 } // namespace content | 1136 } // namespace content |
OLD | NEW |