| 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_GPU_GPU_CHILD_THREAD_H_ | 5 #ifndef CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ | 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 | 35 |
| 36 namespace sandbox { | 36 namespace sandbox { |
| 37 class TargetServices; | 37 class TargetServices; |
| 38 } | 38 } |
| 39 | 39 |
| 40 namespace content { | 40 namespace content { |
| 41 class GpuMemoryBufferFactory; | 41 class GpuMemoryBufferFactory; |
| 42 class GpuProcessControlImpl; | 42 class GpuProcessControlImpl; |
| 43 class GpuWatchdogThread; | 43 class GpuWatchdogThread; |
| 44 class MediaService; |
| 44 | 45 |
| 45 // The main thread of the GPU child process. There will only ever be one of | 46 // The main thread of the GPU child process. There will only ever be one of |
| 46 // these per process. It does process initialization and shutdown. It forwards | 47 // these per process. It does process initialization and shutdown. It forwards |
| 47 // IPC messages to GpuChannelManager, which is responsible for issuing rendering | 48 // IPC messages to GpuChannelManager, which is responsible for issuing rendering |
| 48 // commands to the GPU. | 49 // commands to the GPU. |
| 49 class GpuChildThread : public ChildThreadImpl, | 50 class GpuChildThread : public ChildThreadImpl, |
| 50 public GpuChannelManagerDelegate { | 51 public GpuChannelManagerDelegate { |
| 51 public: | 52 public: |
| 52 typedef std::queue<IPC::Message*> DeferredMessages; | 53 typedef std::queue<IPC::Message*> DeferredMessages; |
| 53 | 54 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 #if defined(OS_WIN) | 146 #if defined(OS_WIN) |
| 146 // Windows specific client sandbox interface. | 147 // Windows specific client sandbox interface. |
| 147 sandbox::TargetServices* target_services_; | 148 sandbox::TargetServices* target_services_; |
| 148 #endif | 149 #endif |
| 149 | 150 |
| 150 // Non-owning. | 151 // Non-owning. |
| 151 gpu::SyncPointManager* sync_point_manager_; | 152 gpu::SyncPointManager* sync_point_manager_; |
| 152 | 153 |
| 153 scoped_ptr<GpuChannelManager> gpu_channel_manager_; | 154 scoped_ptr<GpuChannelManager> gpu_channel_manager_; |
| 154 | 155 |
| 156 scoped_ptr<MediaService> media_service_; |
| 157 |
| 155 // Information about the GPU, such as device and vendor ID. | 158 // Information about the GPU, such as device and vendor ID. |
| 156 gpu::GPUInfo gpu_info_; | 159 gpu::GPUInfo gpu_info_; |
| 157 | 160 |
| 158 // Error messages collected in gpu_main() before the thread is created. | 161 // Error messages collected in gpu_main() before the thread is created. |
| 159 DeferredMessages deferred_messages_; | 162 DeferredMessages deferred_messages_; |
| 160 | 163 |
| 161 // Whether the GPU thread is running in the browser process. | 164 // Whether the GPU thread is running in the browser process. |
| 162 bool in_browser_process_; | 165 bool in_browser_process_; |
| 163 | 166 |
| 164 // The GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. | 167 // The GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. |
| 165 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; | 168 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; |
| 166 | 169 |
| 167 // Process control for Mojo application hosting. | 170 // Process control for Mojo application hosting. |
| 168 scoped_ptr<GpuProcessControlImpl> process_control_; | 171 scoped_ptr<GpuProcessControlImpl> process_control_; |
| 169 | 172 |
| 170 // Bindings to the ProcessControl impl. | 173 // Bindings to the ProcessControl impl. |
| 171 mojo::BindingSet<ProcessControl> process_control_bindings_; | 174 mojo::BindingSet<ProcessControl> process_control_bindings_; |
| 172 | 175 |
| 173 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 176 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 174 }; | 177 }; |
| 175 | 178 |
| 176 } // namespace content | 179 } // namespace content |
| 177 | 180 |
| 178 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 181 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |