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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 std::unique_ptr<cc::Display> display, | 113 std::unique_ptr<cc::Display> display, |
114 std::unique_ptr<cc::SyntheticBeginFrameSource> begin_frame_source, | 114 std::unique_ptr<cc::SyntheticBeginFrameSource> begin_frame_source, |
115 cc::mojom::MojoCompositorFrameSinkRequest request, | 115 cc::mojom::MojoCompositorFrameSinkRequest request, |
116 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, | 116 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, |
117 cc::mojom::MojoCompositorFrameSinkClientPtr client, | 117 cc::mojom::MojoCompositorFrameSinkClientPtr client, |
118 cc::mojom::DisplayPrivateRequest display_private_request); | 118 cc::mojom::DisplayPrivateRequest display_private_request); |
119 | 119 |
120 const cc::SurfaceId& GetRootSurfaceId() const; | 120 const cc::SurfaceId& GetRootSurfaceId() const; |
121 | 121 |
122 // cc::SurfaceObserver implementation. | 122 // cc::SurfaceObserver implementation. |
123 void OnSurfaceCreated(const cc::SurfaceId& surface_id, | 123 void OnSurfaceCreated(const cc::SurfaceInfo& surface_info) override; |
124 const gfx::Size& frame_size, | |
125 float device_scale_factor) override; | |
126 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, | 124 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, |
127 bool* changed) override; | 125 bool* changed) override; |
128 | 126 |
129 // SurfaceManager should be the first object constructed and the last object | 127 // SurfaceManager should be the first object constructed and the last object |
130 // destroyed in order to ensure that all other objects that depend on it have | 128 // destroyed in order to ensure that all other objects that depend on it have |
131 // access to a valid pointer for the entirety of their liftimes. | 129 // access to a valid pointer for the entirety of their liftimes. |
132 cc::SurfaceManager manager_; | 130 cc::SurfaceManager manager_; |
133 | 131 |
134 // Will normally point to |manager_| as it provides the interface. For tests | 132 // Will normally point to |manager_| as it provides the interface. For tests |
135 // it will be swapped out with a mock implementation. | 133 // it will be swapped out with a mock implementation. |
(...skipping 24 matching lines...) Expand all Loading... |
160 | 158 |
161 cc::mojom::DisplayCompositorClientPtr client_; | 159 cc::mojom::DisplayCompositorClientPtr client_; |
162 mojo::Binding<cc::mojom::DisplayCompositor> binding_; | 160 mojo::Binding<cc::mojom::DisplayCompositor> binding_; |
163 | 161 |
164 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); | 162 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); |
165 }; | 163 }; |
166 | 164 |
167 } // namespace ui | 165 } // namespace ui |
168 | 166 |
169 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ | 167 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ |
OLD | NEW |