| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 #if defined(OS_WIN) | 159 #if defined(OS_WIN) |
| 157 // Windows specific client sandbox interface. | 160 // Windows specific client sandbox interface. |
| 158 sandbox::TargetServices* target_services_; | 161 sandbox::TargetServices* target_services_; |
| 159 #endif | 162 #endif |
| 160 | 163 |
| 161 // Can be null if overridden by ContentGpuClient. | 164 // Can be null if overridden by ContentGpuClient. |
| 162 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; | 165 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; |
| 163 | 166 |
| 164 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; | 167 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; |
| 165 | 168 |
| 166 std::unique_ptr<MediaService> media_service_; | 169 std::unique_ptr<media::MediaService> media_service_; |
| 167 | 170 |
| 168 // Information about the GPU, such as device and vendor ID. | 171 // Information about the GPU, such as device and vendor ID. |
| 169 gpu::GPUInfo gpu_info_; | 172 gpu::GPUInfo gpu_info_; |
| 170 | 173 |
| 171 // Error messages collected in gpu_main() before the thread is created. | 174 // Error messages collected in gpu_main() before the thread is created. |
| 172 DeferredMessages deferred_messages_; | 175 DeferredMessages deferred_messages_; |
| 173 | 176 |
| 174 // Whether the GPU thread is running in the browser process. | 177 // Whether the GPU thread is running in the browser process. |
| 175 bool in_browser_process_; | 178 bool in_browser_process_; |
| 176 | 179 |
| 177 // The gpu::GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. | 180 // The gpu::GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. |
| 178 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; | 181 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; |
| 179 | 182 |
| 180 // Process control for Mojo application hosting. | 183 // Process control for Mojo application hosting. |
| 181 std::unique_ptr<GpuProcessControlImpl> process_control_; | 184 std::unique_ptr<GpuProcessControlImpl> process_control_; |
| 182 | 185 |
| 183 // Bindings to the mojom::ProcessControl impl. | 186 // Bindings to the mojom::ProcessControl impl. |
| 184 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_; | 187 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_; |
| 185 | 188 |
| 186 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 189 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 187 }; | 190 }; |
| 188 | 191 |
| 189 } // namespace content | 192 } // namespace content |
| 190 | 193 |
| 191 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 194 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |