Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: services/ui/surfaces/mus_display_provider.h

Issue 2795823003: Create //components/viz/frame_sinks and move code. (Closed)
Patch Set: Fix DEPS. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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_SURFACES_MUS_DISPLAY_PROVIDER_H_ 5 #ifndef SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_
6 #define SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_ 6 #define SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "cc/surfaces/frame_sink_id.h" 13 #include "cc/surfaces/frame_sink_id.h"
14 #include "components/viz/frame_sinks/display_provider.h"
14 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 15 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
15 #include "gpu/ipc/common/surface_handle.h" 16 #include "gpu/ipc/common/surface_handle.h"
16 #include "gpu/ipc/in_process_command_buffer.h" 17 #include "gpu/ipc/in_process_command_buffer.h"
17 #include "services/ui/surfaces/display_provider.h"
18 18
19 namespace gpu { 19 namespace gpu {
20 class ImageFactory; 20 class ImageFactory;
21 } 21 }
22 22
23 namespace ui { 23 namespace ui {
24 24
25 // Mus implementation of DisplayProvider. This will be created in mus-gpu. 25 // Mus implementation of DisplayProvider. This will be created in mus-gpu.
26 class MusDisplayProvider : public NON_EXPORTED_BASE(DisplayProvider) { 26 class MusDisplayProvider : public NON_EXPORTED_BASE(viz::DisplayProvider) {
27 public: 27 public:
28 MusDisplayProvider( 28 MusDisplayProvider(
29 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service, 29 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service,
30 std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager, 30 std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager,
31 gpu::ImageFactory* image_factory); 31 gpu::ImageFactory* image_factory);
32 ~MusDisplayProvider() override; 32 ~MusDisplayProvider() override;
33 33
34 // display_compositor::DisplayProvider: 34 // display_compositor::DisplayProvider:
35 std::unique_ptr<cc::Display> CreateDisplay( 35 std::unique_ptr<cc::Display> CreateDisplay(
36 const cc::FrameSinkId& frame_sink_id, 36 const cc::FrameSinkId& frame_sink_id,
37 gpu::SurfaceHandle surface_handle, 37 gpu::SurfaceHandle surface_handle,
38 std::unique_ptr<cc::BeginFrameSource>* begin_frame_source) override; 38 std::unique_ptr<cc::BeginFrameSource>* begin_frame_source) override;
39 39
40 private: 40 private:
41 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service_; 41 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service_;
42 std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager_; 42 std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager_;
43 gpu::ImageFactory* image_factory_; 43 gpu::ImageFactory* image_factory_;
44 44
45 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 45 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(MusDisplayProvider); 47 DISALLOW_COPY_AND_ASSIGN(MusDisplayProvider);
48 }; 48 };
49 49
50 } // namespace ui 50 } // namespace ui
51 51
52 #endif // SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_ 52 #endif // SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_
OLDNEW
« no previous file with comments | « services/ui/surfaces/mojo_frame_sink_manager.cc ('k') | services/ui/surfaces/mus_display_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698