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

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

Issue 2778863002: Introduce DisplayProvider for DisplayCompositor. (Closed)
Patch Set: Delete extra task runner ref. 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
« no previous file with comments | « services/ui/surfaces/display_provider.h ('k') | services/ui/surfaces/mus_display_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_provider.h ('k') | services/ui/surfaces/mus_display_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698