| 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 28 matching lines...) Expand all Loading... |
| 39 mojo::ScopedSharedBufferHandle activity_flags) override; | 39 mojo::ScopedSharedBufferHandle activity_flags) override; |
| 40 void CreateFrameSinkManager( | 40 void CreateFrameSinkManager( |
| 41 cc::mojom::FrameSinkManagerRequest request, | 41 cc::mojom::FrameSinkManagerRequest request, |
| 42 cc::mojom::FrameSinkManagerClientPtr client) override; | 42 cc::mojom::FrameSinkManagerClientPtr client) override; |
| 43 | 43 |
| 44 void OnStart(); | 44 void OnStart(); |
| 45 | 45 |
| 46 GpuService* gpu_service() { return gpu_service_.get(); } | 46 GpuService* gpu_service() { return gpu_service_.get(); } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 void BindOnGpu(mojom::GpuMainRequest request); |
| 49 void InitOnGpuThread( | 50 void InitOnGpuThread( |
| 50 scoped_refptr<base::SingleThreadTaskRunner> io_runner, | 51 scoped_refptr<base::SingleThreadTaskRunner> io_runner, |
| 51 scoped_refptr<base::SingleThreadTaskRunner> compositor_runner); | 52 scoped_refptr<base::SingleThreadTaskRunner> compositor_runner); |
| 52 | 53 |
| 53 void CreateFrameSinkManagerInternal( | 54 void CreateFrameSinkManagerInternal( |
| 54 cc::mojom::FrameSinkManagerRequest request, | 55 cc::mojom::FrameSinkManagerRequest request, |
| 55 cc::mojom::FrameSinkManagerClientPtrInfo client_info); | 56 cc::mojom::FrameSinkManagerClientPtrInfo client_info); |
| 56 void CreateFrameSinkManagerOnCompositorThread( | 57 void CreateFrameSinkManagerOnCompositorThread( |
| 57 gpu::ImageFactory* image_factory, | 58 gpu::ImageFactory* image_factory, |
| 58 mojom::GpuServicePtrInfo gpu_service_info, | 59 mojom::GpuServicePtrInfo gpu_service_info, |
| 59 cc::mojom::FrameSinkManagerRequest request, | 60 cc::mojom::FrameSinkManagerRequest request, |
| 60 cc::mojom::FrameSinkManagerClientPtrInfo client_info); | 61 cc::mojom::FrameSinkManagerClientPtrInfo client_info); |
| 61 void CreateGpuServiceOnGpuThread(mojom::GpuServiceRequest request, | 62 void CreateGpuServiceOnGpuThread(mojom::GpuServiceRequest request, |
| 62 mojom::GpuHostPtrInfo gpu_host_info, | 63 mojom::GpuHostPtr gpu_host, |
| 63 const gpu::GpuPreferences& preferences, | 64 const gpu::GpuPreferences& preferences, |
| 64 gpu::GpuProcessActivityFlags activity_flags); | 65 gpu::GpuProcessActivityFlags activity_flags); |
| 65 void BindGpuInternalOnGpuThread(mojom::GpuServiceRequest request); | 66 void BindGpuInternalOnGpuThread(mojom::GpuServiceRequest request); |
| 66 | 67 |
| 67 void TearDownOnCompositorThread(); | 68 void TearDownOnCompositorThread(); |
| 68 void TearDownOnGpuThread(); | 69 void TearDownOnGpuThread(); |
| 69 | 70 |
| 70 // gpu::GpuSandboxHelper: | 71 // gpu::GpuSandboxHelper: |
| 71 void PreSandboxStartup() override; | 72 void PreSandboxStartup() override; |
| 72 bool EnsureSandboxInitialized( | 73 bool EnsureSandboxInitialized( |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 112 |
| 112 base::PowerMonitor power_monitor_; | 113 base::PowerMonitor power_monitor_; |
| 113 mojo::Binding<mojom::GpuMain> binding_; | 114 mojo::Binding<mojom::GpuMain> binding_; |
| 114 | 115 |
| 115 DISALLOW_COPY_AND_ASSIGN(GpuMain); | 116 DISALLOW_COPY_AND_ASSIGN(GpuMain); |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace ui | 119 } // namespace ui |
| 119 | 120 |
| 120 #endif // SERVICES_UI_GPU_GPU_MAIN_H_ | 121 #endif // SERVICES_UI_GPU_GPU_MAIN_H_ |
| OLD | NEW |