| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_ |
| 6 #define SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" |
| 13 #include "cc/surfaces/frame_sink_id.h" |
| 14 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" |
| 15 #include "gpu/ipc/common/surface_handle.h" |
| 16 #include "gpu/ipc/in_process_command_buffer.h" |
| 17 #include "services/ui/surfaces/display_provider.h" |
| 18 |
| 19 namespace gpu { |
| 20 class ImageFactory; |
| 21 } |
| 22 |
| 23 namespace ui { |
| 24 |
| 25 // Mus implementation of DisplayProvider. This will be created in mus-gpu. |
| 26 class MusDisplayProvider : public NON_EXPORTED_BASE(DisplayProvider) { |
| 27 public: |
| 28 MusDisplayProvider( |
| 29 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service, |
| 30 std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager, |
| 31 gpu::ImageFactory* image_factory); |
| 32 ~MusDisplayProvider() override; |
| 33 |
| 34 // display_compositor::DisplayProvider: |
| 35 std::unique_ptr<cc::Display> CreateDisplay( |
| 36 const cc::FrameSinkId& frame_sink_id, |
| 37 gpu::SurfaceHandle surface_handle, |
| 38 std::unique_ptr<cc::BeginFrameSource>* begin_frame_source) override; |
| 39 |
| 40 private: |
| 41 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service_; |
| 42 std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager_; |
| 43 gpu::ImageFactory* image_factory_; |
| 44 |
| 45 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(MusDisplayProvider); |
| 48 }; |
| 49 |
| 50 } // namespace ui |
| 51 |
| 52 #endif // SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_ |
| OLD | NEW |