| 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 <memory> | 10 #include <memory> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "gpu/ipc/service/x_util.h" | 27 #include "gpu/ipc/service/x_util.h" |
| 28 #include "mojo/public/cpp/bindings/binding_set.h" | 28 #include "mojo/public/cpp/bindings/binding_set.h" |
| 29 #include "mojo/public/cpp/bindings/interface_request.h" | 29 #include "mojo/public/cpp/bindings/interface_request.h" |
| 30 #include "ui/gfx/native_widget_types.h" | 30 #include "ui/gfx/native_widget_types.h" |
| 31 | 31 |
| 32 namespace gpu { | 32 namespace gpu { |
| 33 class GpuMemoryBufferFactory; | 33 class GpuMemoryBufferFactory; |
| 34 class SyncPointManager; | 34 class SyncPointManager; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace media { |
| 38 class MediaService; |
| 39 } |
| 40 |
| 37 namespace sandbox { | 41 namespace sandbox { |
| 38 class TargetServices; | 42 class TargetServices; |
| 39 } | 43 } |
| 40 | 44 |
| 41 namespace content { | 45 namespace content { |
| 42 class GpuProcessControlImpl; | 46 class GpuProcessControlImpl; |
| 43 class GpuWatchdogThread; | 47 class GpuWatchdogThread; |
| 44 class MediaService; | |
| 45 struct EstablishChannelParams; | 48 struct EstablishChannelParams; |
| 46 #if defined(OS_MACOSX) | 49 #if defined(OS_MACOSX) |
| 47 struct BufferPresentedParams; | 50 struct BufferPresentedParams; |
| 48 #endif | 51 #endif |
| 49 | 52 |
| 50 // The main thread of the GPU child process. There will only ever be one of | 53 // The main thread of the GPU child process. There will only ever be one of |
| 51 // these per process. It does process initialization and shutdown. It forwards | 54 // these per process. It does process initialization and shutdown. It forwards |
| 52 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing | 55 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing |
| 53 // rendering commands to the GPU. | 56 // rendering commands to the GPU. |
| 54 class GpuChildThread : public ChildThreadImpl, | 57 class GpuChildThread : public ChildThreadImpl, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 #if defined(OS_WIN) | 163 #if defined(OS_WIN) |
| 161 // Windows specific client sandbox interface. | 164 // Windows specific client sandbox interface. |
| 162 sandbox::TargetServices* target_services_; | 165 sandbox::TargetServices* target_services_; |
| 163 #endif | 166 #endif |
| 164 | 167 |
| 165 // Non-owning. | 168 // Non-owning. |
| 166 gpu::SyncPointManager* sync_point_manager_; | 169 gpu::SyncPointManager* sync_point_manager_; |
| 167 | 170 |
| 168 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; | 171 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; |
| 169 | 172 |
| 170 std::unique_ptr<MediaService> media_service_; | 173 std::unique_ptr<media::MediaService> media_service_; |
| 171 | 174 |
| 172 // Information about the GPU, such as device and vendor ID. | 175 // Information about the GPU, such as device and vendor ID. |
| 173 gpu::GPUInfo gpu_info_; | 176 gpu::GPUInfo gpu_info_; |
| 174 | 177 |
| 175 // Error messages collected in gpu_main() before the thread is created. | 178 // Error messages collected in gpu_main() before the thread is created. |
| 176 DeferredMessages deferred_messages_; | 179 DeferredMessages deferred_messages_; |
| 177 | 180 |
| 178 // Whether the GPU thread is running in the browser process. | 181 // Whether the GPU thread is running in the browser process. |
| 179 bool in_browser_process_; | 182 bool in_browser_process_; |
| 180 | 183 |
| 181 // The gpu::GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. | 184 // The gpu::GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. |
| 182 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; | 185 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; |
| 183 | 186 |
| 184 // Process control for Mojo application hosting. | 187 // Process control for Mojo application hosting. |
| 185 std::unique_ptr<GpuProcessControlImpl> process_control_; | 188 std::unique_ptr<GpuProcessControlImpl> process_control_; |
| 186 | 189 |
| 187 // Bindings to the mojom::ProcessControl impl. | 190 // Bindings to the mojom::ProcessControl impl. |
| 188 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_; | 191 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_; |
| 189 | 192 |
| 190 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 193 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 191 }; | 194 }; |
| 192 | 195 |
| 193 } // namespace content | 196 } // namespace content |
| 194 | 197 |
| 195 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 198 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |