OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ | 5 #ifndef COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ |
6 #define COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ | 6 #define COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 18 matching lines...) Expand all Loading... |
29 // hierarchy and manages surface lifetime. | 29 // hierarchy and manages surface lifetime. |
30 // | 30 // |
31 // This is intended to be created in the viz or GPU process. For mus+ash this | 31 // This is intended to be created in the viz or GPU process. For mus+ash this |
32 // will be true after the mus process split. For non-mus Chrome this will be | 32 // will be true after the mus process split. For non-mus Chrome this will be |
33 // created in the browser process, at least until GPU implementations can be | 33 // created in the browser process, at least until GPU implementations can be |
34 // unified. | 34 // unified. |
35 class MojoFrameSinkManager : public cc::SurfaceObserver, | 35 class MojoFrameSinkManager : public cc::SurfaceObserver, |
36 public GpuCompositorFrameSinkDelegate, | 36 public GpuCompositorFrameSinkDelegate, |
37 public cc::mojom::FrameSinkManager { | 37 public cc::mojom::FrameSinkManager { |
38 public: | 38 public: |
39 MojoFrameSinkManager(DisplayProvider* display_provider, | 39 MojoFrameSinkManager(bool use_surface_references, |
| 40 DisplayProvider* display_provider, |
40 cc::mojom::FrameSinkManagerRequest request, | 41 cc::mojom::FrameSinkManagerRequest request, |
41 cc::mojom::FrameSinkManagerClientPtr client); | 42 cc::mojom::FrameSinkManagerClientPtr client); |
42 ~MojoFrameSinkManager() override; | 43 ~MojoFrameSinkManager() override; |
43 | 44 |
44 cc::SurfaceManager* manager() { return &manager_; } | 45 cc::SurfaceManager* surface_manager() { return &manager_; } |
45 | 46 |
46 // cc::mojom::MojoFrameSinkManager implementation: | 47 // cc::mojom::MojoFrameSinkManager implementation: |
47 void CreateRootCompositorFrameSink( | 48 void CreateRootCompositorFrameSink( |
48 const cc::FrameSinkId& frame_sink_id, | 49 const cc::FrameSinkId& frame_sink_id, |
49 gpu::SurfaceHandle surface_handle, | 50 gpu::SurfaceHandle surface_handle, |
50 cc::mojom::MojoCompositorFrameSinkAssociatedRequest request, | 51 cc::mojom::MojoCompositorFrameSinkAssociatedRequest request, |
51 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, | 52 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, |
52 cc::mojom::MojoCompositorFrameSinkClientPtr client, | 53 cc::mojom::MojoCompositorFrameSinkClientPtr client, |
53 cc::mojom::DisplayPrivateAssociatedRequest display_private_request) | 54 cc::mojom::DisplayPrivateAssociatedRequest display_private_request) |
54 override; | 55 override; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 102 |
102 cc::mojom::FrameSinkManagerClientPtr client_; | 103 cc::mojom::FrameSinkManagerClientPtr client_; |
103 mojo::Binding<cc::mojom::FrameSinkManager> binding_; | 104 mojo::Binding<cc::mojom::FrameSinkManager> binding_; |
104 | 105 |
105 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager); | 106 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager); |
106 }; | 107 }; |
107 | 108 |
108 } // namespace viz | 109 } // namespace viz |
109 | 110 |
110 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ | 111 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ |
OLD | NEW |