| 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 SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ | 5 #ifndef SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ |
| 6 #define SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ | 6 #define SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void OnCompositorFrameSinkPrivateConnectionLost( | 81 void OnCompositorFrameSinkPrivateConnectionLost( |
| 82 const cc::FrameSinkId& frame_sink_id, | 82 const cc::FrameSinkId& frame_sink_id, |
| 83 bool destroy_compositor_frame_sink); | 83 bool destroy_compositor_frame_sink); |
| 84 | 84 |
| 85 // cc::mojom::DisplayCompositor implementation: | 85 // cc::mojom::DisplayCompositor implementation: |
| 86 void CreateDisplayCompositorFrameSink( | 86 void CreateDisplayCompositorFrameSink( |
| 87 const cc::FrameSinkId& frame_sink_id, | 87 const cc::FrameSinkId& frame_sink_id, |
| 88 gpu::SurfaceHandle surface_handle, | 88 gpu::SurfaceHandle surface_handle, |
| 89 cc::mojom::MojoCompositorFrameSinkRequest request, | 89 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 90 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, | 90 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, |
| 91 cc::mojom::MojoCompositorFrameSinkClientPtr client) override; | 91 cc::mojom::MojoCompositorFrameSinkClientPtr client, |
| 92 cc::mojom::DisplayPrivateRequest display_request) override; |
| 92 void CreateOffscreenCompositorFrameSink( | 93 void CreateOffscreenCompositorFrameSink( |
| 93 const cc::FrameSinkId& frame_sink_id, | 94 const cc::FrameSinkId& frame_sink_id, |
| 94 cc::mojom::MojoCompositorFrameSinkRequest request, | 95 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 95 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, | 96 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, |
| 96 cc::mojom::MojoCompositorFrameSinkClientPtr client) override; | 97 cc::mojom::MojoCompositorFrameSinkClientPtr client) override; |
| 97 | 98 |
| 98 private: | 99 private: |
| 99 friend class test::DisplayCompositorTest; | 100 friend class test::DisplayCompositorTest; |
| 100 | 101 |
| 101 void AddSurfaceReference(const cc::SurfaceReference& ref); | 102 void AddSurfaceReference(const cc::SurfaceReference& ref); |
| 102 void RemoveSurfaceReference(const cc::SurfaceReference& ref); | 103 void RemoveSurfaceReference(const cc::SurfaceReference& ref); |
| 103 | 104 |
| 104 std::unique_ptr<cc::Display> CreateDisplay( | 105 std::unique_ptr<cc::Display> CreateDisplay( |
| 105 const cc::FrameSinkId& frame_sink_id, | 106 const cc::FrameSinkId& frame_sink_id, |
| 106 gpu::SurfaceHandle surface_handle, | 107 gpu::SurfaceHandle surface_handle, |
| 107 cc::SyntheticBeginFrameSource* begin_frame_source); | 108 cc::SyntheticBeginFrameSource* begin_frame_source); |
| 108 | 109 |
| 109 void CreateCompositorFrameSinkInternal( | 110 void CreateCompositorFrameSinkInternal( |
| 110 const cc::FrameSinkId& frame_sink_id, | 111 const cc::FrameSinkId& frame_sink_id, |
| 111 gpu::SurfaceHandle surface_handle, | 112 gpu::SurfaceHandle surface_handle, |
| 112 std::unique_ptr<cc::Display> display, | 113 std::unique_ptr<cc::Display> display, |
| 113 std::unique_ptr<cc::SyntheticBeginFrameSource> begin_frame_source, | 114 std::unique_ptr<cc::SyntheticBeginFrameSource> begin_frame_source, |
| 114 cc::mojom::MojoCompositorFrameSinkRequest request, | 115 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 115 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, | 116 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, |
| 116 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 117 cc::mojom::MojoCompositorFrameSinkClientPtr client, |
| 118 cc::mojom::DisplayPrivateRequest display_private_request); |
| 117 | 119 |
| 118 const cc::SurfaceId& GetRootSurfaceId() const; | 120 const cc::SurfaceId& GetRootSurfaceId() const; |
| 119 | 121 |
| 120 // cc::SurfaceObserver implementation. | 122 // cc::SurfaceObserver implementation. |
| 121 void OnSurfaceCreated(const cc::SurfaceId& surface_id, | 123 void OnSurfaceCreated(const cc::SurfaceId& surface_id, |
| 122 const gfx::Size& frame_size, | 124 const gfx::Size& frame_size, |
| 123 float device_scale_factor) override; | 125 float device_scale_factor) override; |
| 124 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, | 126 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, |
| 125 bool* changed) override; | 127 bool* changed) override; |
| 126 | 128 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 160 |
| 159 cc::mojom::DisplayCompositorClientPtr client_; | 161 cc::mojom::DisplayCompositorClientPtr client_; |
| 160 mojo::Binding<cc::mojom::DisplayCompositor> binding_; | 162 mojo::Binding<cc::mojom::DisplayCompositor> binding_; |
| 161 | 163 |
| 162 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); | 164 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); |
| 163 }; | 165 }; |
| 164 | 166 |
| 165 } // namespace ui | 167 } // namespace ui |
| 166 | 168 |
| 167 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ | 169 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ |
| OLD | NEW |