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_MAIN_H_ | 5 #ifndef SERVICES_UI_GPU_GPU_MAIN_H_ |
6 #define SERVICES_UI_GPU_GPU_MAIN_H_ | 6 #define SERVICES_UI_GPU_GPU_MAIN_H_ |
7 | 7 |
8 #include "base/power_monitor/power_monitor.h" | 8 #include "base/power_monitor/power_monitor.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "gpu/ipc/in_process_command_buffer.h" | 10 #include "gpu/ipc/in_process_command_buffer.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 void BindOnGpu(mojom::GpuMainRequest request); | 49 void BindOnGpu(mojom::GpuMainRequest request); |
50 void InitOnGpuThread( | 50 void InitOnGpuThread( |
51 scoped_refptr<base::SingleThreadTaskRunner> io_runner, | 51 scoped_refptr<base::SingleThreadTaskRunner> io_runner, |
52 scoped_refptr<base::SingleThreadTaskRunner> compositor_runner); | 52 scoped_refptr<base::SingleThreadTaskRunner> compositor_runner); |
53 | 53 |
54 void CreateFrameSinkManagerInternal( | 54 void CreateFrameSinkManagerInternal( |
55 cc::mojom::FrameSinkManagerRequest request, | 55 cc::mojom::FrameSinkManagerRequest request, |
56 cc::mojom::FrameSinkManagerClientPtrInfo client_info); | 56 cc::mojom::FrameSinkManagerClientPtrInfo client_info); |
57 void CreateFrameSinkManagerOnCompositorThread( | 57 void CreateFrameSinkManagerOnCompositorThread( |
58 gpu::ImageFactory* image_factory, | 58 gpu::ImageFactory* image_factory, |
59 mojom::GpuServicePtrInfo gpu_service_info, | |
60 cc::mojom::FrameSinkManagerRequest request, | 59 cc::mojom::FrameSinkManagerRequest request, |
61 cc::mojom::FrameSinkManagerClientPtrInfo client_info); | 60 cc::mojom::FrameSinkManagerClientPtrInfo client_info); |
62 void CreateGpuServiceOnGpuThread(mojom::GpuServiceRequest request, | 61 void CreateGpuServiceOnGpuThread(mojom::GpuServiceRequest request, |
63 mojom::GpuHostPtr gpu_host, | 62 mojom::GpuHostPtr gpu_host, |
64 const gpu::GpuPreferences& preferences, | 63 const gpu::GpuPreferences& preferences, |
65 gpu::GpuProcessActivityFlags activity_flags); | 64 gpu::GpuProcessActivityFlags activity_flags); |
66 void BindGpuInternalOnGpuThread(mojom::GpuServiceRequest request); | |
67 | 65 |
68 void TearDownOnCompositorThread(); | 66 void TearDownOnCompositorThread(); |
69 void TearDownOnGpuThread(); | 67 void TearDownOnGpuThread(); |
70 | 68 |
71 // gpu::GpuSandboxHelper: | 69 // gpu::GpuSandboxHelper: |
72 void PreSandboxStartup() override; | 70 void PreSandboxStartup() override; |
73 bool EnsureSandboxInitialized( | 71 bool EnsureSandboxInitialized( |
74 gpu::GpuWatchdogThread* watchdog_thread) override; | 72 gpu::GpuWatchdogThread* watchdog_thread) override; |
75 | 73 |
76 std::unique_ptr<gpu::GpuInit> gpu_init_; | 74 std::unique_ptr<gpu::GpuInit> gpu_init_; |
77 std::unique_ptr<GpuService> gpu_service_; | 75 std::unique_ptr<GpuService> gpu_service_; |
78 | 76 |
79 // The message-pipe used by the FrameSinkManager to request gpu memory | |
80 // buffers. | |
81 mojom::GpuServicePtr gpu_internal_; | |
82 | |
83 // The InCommandCommandBuffer::Service used by the frame sink manager. | 77 // The InCommandCommandBuffer::Service used by the frame sink manager. |
84 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service_; | 78 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service_; |
85 | 79 |
86 // If the gpu service is not yet ready then we stash pending MessagePipes in | 80 // If the gpu service is not yet ready then we stash pending MessagePipes in |
87 // these member variables. | 81 // these member variables. |
88 cc::mojom::FrameSinkManagerRequest pending_frame_sink_manager_request_; | 82 cc::mojom::FrameSinkManagerRequest pending_frame_sink_manager_request_; |
89 cc::mojom::FrameSinkManagerClientPtrInfo | 83 cc::mojom::FrameSinkManagerClientPtrInfo |
90 pending_frame_sink_manager_client_info_; | 84 pending_frame_sink_manager_client_info_; |
91 | 85 |
92 // Provides mojo interfaces for creating and managing FrameSinks. | 86 // Provides mojo interfaces for creating and managing FrameSinks. |
(...skipping 19 matching lines...) Expand all Loading... |
112 | 106 |
113 base::PowerMonitor power_monitor_; | 107 base::PowerMonitor power_monitor_; |
114 mojo::Binding<mojom::GpuMain> binding_; | 108 mojo::Binding<mojom::GpuMain> binding_; |
115 | 109 |
116 DISALLOW_COPY_AND_ASSIGN(GpuMain); | 110 DISALLOW_COPY_AND_ASSIGN(GpuMain); |
117 }; | 111 }; |
118 | 112 |
119 } // namespace ui | 113 } // namespace ui |
120 | 114 |
121 #endif // SERVICES_UI_GPU_GPU_MAIN_H_ | 115 #endif // SERVICES_UI_GPU_GPU_MAIN_H_ |
OLD | NEW |