| 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 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // Tells the GPU process to create a new image using the given window. | 111 // Tells the GPU process to create a new image using the given window. |
| 112 void CreateImage( | 112 void CreateImage( |
| 113 gfx::PluginWindowHandle window, | 113 gfx::PluginWindowHandle window, |
| 114 int client_id, | 114 int client_id, |
| 115 int image_id, | 115 int image_id, |
| 116 const CreateImageCallback& callback); | 116 const CreateImageCallback& callback); |
| 117 | 117 |
| 118 // Tells the GPU process to delete image. | 118 // Tells the GPU process to delete image. |
| 119 void DeleteImage(int client_id, int image_id, int sync_point); | 119 void DeleteImage(int client_id, int image_id, int sync_point); |
| 120 | 120 |
| 121 // Whether this GPU process is set up to use software rendering. | |
| 122 bool software_rendering(); | |
| 123 | |
| 124 // What kind of GPU process, e.g. sandboxed or unsandboxed. | 121 // What kind of GPU process, e.g. sandboxed or unsandboxed. |
| 125 GpuProcessKind kind(); | 122 GpuProcessKind kind(); |
| 126 | 123 |
| 127 void ForceShutdown(); | 124 void ForceShutdown(); |
| 128 | 125 |
| 129 void BeginFrameSubscription( | 126 void BeginFrameSubscription( |
| 130 int surface_id, | 127 int surface_id, |
| 131 base::WeakPtr<RenderWidgetHostViewFrameSubscriber> subscriber); | 128 base::WeakPtr<RenderWidgetHostViewFrameSubscriber> subscriber); |
| 132 void EndFrameSubscription(int surface_id); | 129 void EndFrameSubscription(int surface_id); |
| 133 void LoadedShader(const std::string& key, const std::string& data); | 130 void LoadedShader(const std::string& key, const std::string& data); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // Qeueud messages to send when the process launches. | 203 // Qeueud messages to send when the process launches. |
| 207 std::queue<IPC::Message*> queued_messages_; | 204 std::queue<IPC::Message*> queued_messages_; |
| 208 | 205 |
| 209 // Whether the GPU process is valid, set to false after Send() failed. | 206 // Whether the GPU process is valid, set to false after Send() failed. |
| 210 bool valid_; | 207 bool valid_; |
| 211 | 208 |
| 212 // Whether we are running a GPU thread inside the browser process instead | 209 // Whether we are running a GPU thread inside the browser process instead |
| 213 // of a separate GPU process. | 210 // of a separate GPU process. |
| 214 bool in_process_; | 211 bool in_process_; |
| 215 | 212 |
| 216 bool software_rendering_; | 213 bool swiftshader_rendering_; |
| 217 GpuProcessKind kind_; | 214 GpuProcessKind kind_; |
| 218 | 215 |
| 219 scoped_ptr<GpuMainThread> in_process_gpu_thread_; | 216 scoped_ptr<GpuMainThread> in_process_gpu_thread_; |
| 220 | 217 |
| 221 // Whether we actually launched a GPU process. | 218 // Whether we actually launched a GPU process. |
| 222 bool process_launched_; | 219 bool process_launched_; |
| 223 | 220 |
| 224 // Whether the GPU process successfully initialized. | 221 // Whether the GPU process successfully initialized. |
| 225 bool initialized_; | 222 bool initialized_; |
| 226 | 223 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 typedef std::multimap<int, scoped_refptr<GpuSurfaceTracker::SurfaceRef> > | 263 typedef std::multimap<int, scoped_refptr<GpuSurfaceTracker::SurfaceRef> > |
| 267 SurfaceRefMap; | 264 SurfaceRefMap; |
| 268 SurfaceRefMap surface_refs_; | 265 SurfaceRefMap surface_refs_; |
| 269 | 266 |
| 270 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 267 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
| 271 }; | 268 }; |
| 272 | 269 |
| 273 } // namespace content | 270 } // namespace content |
| 274 | 271 |
| 275 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 272 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| OLD | NEW |