| 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_H_ | 5 #ifndef SERVICES_UI_GPU_GPU_SERVICE_H_ |
| 6 #define SERVICES_UI_GPU_GPU_SERVICE_H_ | 6 #define SERVICES_UI_GPU_GPU_SERVICE_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/task/cancelable_task_tracker.h" | 10 #include "base/task/cancelable_task_tracker.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ~GpuService() override; | 54 ~GpuService() override; |
| 55 | 55 |
| 56 void UpdateGPUInfoFromPreferences(const gpu::GpuPreferences& preferences); | 56 void UpdateGPUInfoFromPreferences(const gpu::GpuPreferences& preferences); |
| 57 | 57 |
| 58 void InitializeWithHost(mojom::GpuHostPtr gpu_host, | 58 void InitializeWithHost(mojom::GpuHostPtr gpu_host, |
| 59 gpu::GpuProcessActivityFlags activity_flags, | 59 gpu::GpuProcessActivityFlags activity_flags, |
| 60 gpu::SyncPointManager* sync_point_manager = nullptr, | 60 gpu::SyncPointManager* sync_point_manager = nullptr, |
| 61 base::WaitableEvent* shutdown_event = nullptr); | 61 base::WaitableEvent* shutdown_event = nullptr); |
| 62 void Bind(mojom::GpuServiceRequest request); | 62 void Bind(mojom::GpuServiceRequest request); |
| 63 | 63 |
| 64 bool is_initialized() const { return !!gpu_host_; } |
| 65 |
| 64 media::MediaGpuChannelManager* media_gpu_channel_manager() { | 66 media::MediaGpuChannelManager* media_gpu_channel_manager() { |
| 65 return media_gpu_channel_manager_.get(); | 67 return media_gpu_channel_manager_.get(); |
| 66 } | 68 } |
| 67 | 69 |
| 68 gpu::GpuChannelManager* gpu_channel_manager() { | 70 gpu::GpuChannelManager* gpu_channel_manager() { |
| 69 return gpu_channel_manager_.get(); | 71 return gpu_channel_manager_.get(); |
| 70 } | 72 } |
| 71 | 73 |
| 72 gpu::ImageFactory* gpu_image_factory(); | 74 gpu::ImageFactory* gpu_image_factory(); |
| 73 | 75 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 198 |
| 197 base::WeakPtr<GpuService> weak_ptr_; | 199 base::WeakPtr<GpuService> weak_ptr_; |
| 198 base::WeakPtrFactory<GpuService> weak_ptr_factory_; | 200 base::WeakPtrFactory<GpuService> weak_ptr_factory_; |
| 199 | 201 |
| 200 DISALLOW_COPY_AND_ASSIGN(GpuService); | 202 DISALLOW_COPY_AND_ASSIGN(GpuService); |
| 201 }; | 203 }; |
| 202 | 204 |
| 203 } // namespace ui | 205 } // namespace ui |
| 204 | 206 |
| 205 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ | 207 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ |
| OLD | NEW |