OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_UI_GPU_GPU_SERVICE_INTERNAL_H_ | 5 #ifndef SERVICES_UI_GPU_GPU_SERVICE_INTERNAL_H_ |
6 #define SERVICES_UI_GPU_GPU_SERVICE_INTERNAL_H_ | 6 #define SERVICES_UI_GPU_GPU_SERVICE_INTERNAL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
11 #include "base/threading/thread.h" | |
11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
12 #include "gpu/command_buffer/service/gpu_preferences.h" | 13 #include "gpu/command_buffer/service/gpu_preferences.h" |
13 #include "gpu/config/gpu_info.h" | 14 #include "gpu/config/gpu_info.h" |
14 #include "gpu/ipc/common/surface_handle.h" | 15 #include "gpu/ipc/common/surface_handle.h" |
15 #include "gpu/ipc/service/gpu_channel.h" | 16 #include "gpu/ipc/service/gpu_channel.h" |
16 #include "gpu/ipc/service/gpu_channel_manager.h" | 17 #include "gpu/ipc/service/gpu_channel_manager.h" |
17 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" | 18 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" |
18 #include "gpu/ipc/service/gpu_config.h" | 19 #include "gpu/ipc/service/gpu_config.h" |
19 #include "gpu/ipc/service/x_util.h" | 20 #include "gpu/ipc/service/x_util.h" |
20 #include "mojo/public/cpp/bindings/binding.h" | 21 #include "mojo/public/cpp/bindings/binding.h" |
22 #include "mojo/public/cpp/bindings/binding_set.h" | |
21 #include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h" | 23 #include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h" |
24 #include "services/ui/surfaces/display_compositor.h" | |
22 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
23 | 26 |
24 namespace gpu { | 27 namespace gpu { |
25 class GpuChannelHost; | 28 class GpuChannelHost; |
26 class GpuMemoryBufferFactory; | 29 class GpuMemoryBufferFactory; |
27 class GpuWatchdogThread; | 30 class GpuWatchdogThread; |
28 class SyncPointManager; | 31 class SyncPointManager; |
29 } | 32 } |
30 | 33 |
31 namespace media { | 34 namespace media { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 gfx::GpuMemoryBufferId id, | 93 gfx::GpuMemoryBufferId id, |
91 const gfx::Size& size, | 94 const gfx::Size& size, |
92 gfx::BufferFormat format, | 95 gfx::BufferFormat format, |
93 gfx::BufferUsage usage, | 96 gfx::BufferUsage usage, |
94 int client_id, | 97 int client_id, |
95 gpu::SurfaceHandle surface_handle, | 98 gpu::SurfaceHandle surface_handle, |
96 const CreateGpuMemoryBufferCallback& callback) override; | 99 const CreateGpuMemoryBufferCallback& callback) override; |
97 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, | 100 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
98 int client_id, | 101 int client_id, |
99 const gpu::SyncToken& sync_token) override; | 102 const gpu::SyncToken& sync_token) override; |
103 void CreateDisplayCompositor( | |
104 cc::mojom::DisplayCompositorRequest request, | |
105 cc::mojom::DisplayCompositorClientPtr client) override; | |
106 | |
107 void CreateDisplayCompositorOnCompositorThread( | |
rjkroege
2016/11/21 23:05:36
how are the threads going to be identified in the
Fady Samuel
2016/11/22 01:02:23
Done.
| |
108 mojom::GpuServiceInternalPtrInfo gpu_service_info, | |
109 cc::mojom::DisplayCompositorRequest request, | |
110 cc::mojom::DisplayCompositorClientPtrInfo client_info); | |
100 | 111 |
101 scoped_refptr<base::SingleThreadTaskRunner> io_runner_; | 112 scoped_refptr<base::SingleThreadTaskRunner> io_runner_; |
102 | 113 |
103 // An event that will be signalled when we shutdown. | 114 // An event that will be signalled when we shutdown. |
104 base::WaitableEvent shutdown_event_; | 115 base::WaitableEvent shutdown_event_; |
105 | 116 |
106 std::unique_ptr<gpu::GpuWatchdogThread> watchdog_thread_; | 117 std::unique_ptr<gpu::GpuWatchdogThread> watchdog_thread_; |
107 | 118 |
108 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory_; | 119 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory_; |
109 | 120 |
110 gpu::GpuPreferences gpu_preferences_; | 121 gpu::GpuPreferences gpu_preferences_; |
111 | 122 |
112 // Information about the GPU, such as device and vendor ID. | 123 // Information about the GPU, such as device and vendor ID. |
113 gpu::GPUInfo gpu_info_; | 124 gpu::GPUInfo gpu_info_; |
114 | 125 |
126 base::Thread compositor_thread_; | |
127 | |
128 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service_; | |
115 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; | 129 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; |
116 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; | 130 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; |
117 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_; | 131 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_; |
118 mojo::Binding<mojom::GpuServiceInternal> binding_; | 132 mojo::BindingSet<mojom::GpuServiceInternal> bindings_; |
119 | 133 |
120 DISALLOW_COPY_AND_ASSIGN(GpuServiceInternal); | 134 DISALLOW_COPY_AND_ASSIGN(GpuServiceInternal); |
121 }; | 135 }; |
122 | 136 |
123 } // namespace ui | 137 } // namespace ui |
124 | 138 |
125 #endif // SERVICES_UI_GPU_GPU_SERVICE_INTERNAL_H_ | 139 #endif // SERVICES_UI_GPU_GPU_SERVICE_INTERNAL_H_ |
OLD | NEW |