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

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

Issue 2539893002: Mus: Implement GpuMain mojo interface (Closed)
Patch Set: Cleanup of naming some more Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_FACTORY_H_
6 #define SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_FACTORY_H_
7
8 #include "base/threading/thread.h"
9 #include "base/threading/thread_checker.h"
10 #include "cc/ipc/display_compositor.mojom.h"
11 #include "mojo/public/cpp/bindings/binding.h"
12 #include "services/ui/surfaces/display_compositor.h"
13
14 namespace gpu {
15 class ImageFactory;
16 }
17
18 namespace ui {
19
20 class DisplayCompositorFactoryDelegate;
21
22 // A DisplayCompositorFactory permits the display compositor to request a
23 // DisplayCompositor interface while providing a DisplayCompositorClient
24 // interface.
25 class DisplayCompositorFactory : public cc::mojom::DisplayCompositorFactory {
26 public:
27 DisplayCompositorFactory(
28 DisplayCompositorFactoryDelegate* delegate,
29 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service,
30 scoped_refptr<base::SingleThreadTaskRunner> compositor_runner,
31 gpu::ImageFactory* image_factory,
32 cc::mojom::DisplayCompositorFactoryRequest request);
33
34 ~DisplayCompositorFactory() override;
35
36 // cc::mojom::DisplayCompositorFactory implementation.
37 void CreateDisplayCompositor(
38 cc::mojom::DisplayCompositorRequest display_compositor_request,
39 cc::mojom::DisplayCompositorClientPtr display_compositor_client) override;
40
41 private:
42 DisplayCompositorFactoryDelegate* const delegate_;
43
44 scoped_refptr<base::SingleThreadTaskRunner> compositor_runner_;
45
46 gpu::ImageFactory* image_factory_;
47
48 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service_;
49
50 std::unique_ptr<DisplayCompositor> display_compositor_;
51
52 // Used for DCHECKs to ensure methods are executed on the correct thread.
53 base::ThreadChecker thread_checker_;
54
55 mojo::Binding<cc::mojom::DisplayCompositorFactory> binding_;
56 };
57
58 } // namespace ui
59
60 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698