OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 #include <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 class SurfaceInfo; | 10 class SurfaceInfo; |
(...skipping 12 matching lines...) Expand all Loading... |
23 // layer, and updating them when the client submits new surfaces. | 23 // layer, and updating them when the client submits new surfaces. |
24 class ClientSurfaceEmbedder { | 24 class ClientSurfaceEmbedder { |
25 public: | 25 public: |
26 explicit ClientSurfaceEmbedder(Window* window); | 26 explicit ClientSurfaceEmbedder(Window* window); |
27 ~ClientSurfaceEmbedder(); | 27 ~ClientSurfaceEmbedder(); |
28 | 28 |
29 // Updates the clip layer and primary SurfaceInfo of the surface layer based | 29 // Updates the clip layer and primary SurfaceInfo of the surface layer based |
30 // on the provided |surface_info|. | 30 // on the provided |surface_info|. |
31 void SetPrimarySurfaceInfo(const cc::SurfaceInfo& surface_info); | 31 void SetPrimarySurfaceInfo(const cc::SurfaceInfo& surface_info); |
32 | 32 |
| 33 // Sets the fallback SurfaceInfo of the surface layer. The clip layer is not |
| 34 // updated. |
| 35 void SetFallbackSurfaceInfo(const cc::SurfaceInfo& surface_info); |
| 36 |
33 private: | 37 private: |
34 // The window which embeds the client. | 38 // The window which embeds the client. |
35 Window* window_; | 39 Window* window_; |
36 | 40 |
37 // Contains the client's content. | 41 // Contains the client's content. |
38 std::unique_ptr<ui::Layer> surface_layer_; | 42 std::unique_ptr<ui::Layer> surface_layer_; |
39 | 43 |
40 // Used for clipping the surface layer to the window bounds. | 44 // Used for clipping the surface layer to the window bounds. |
41 std::unique_ptr<ui::Layer> clip_layer_; | 45 std::unique_ptr<ui::Layer> clip_layer_; |
42 | 46 |
43 DISALLOW_COPY_AND_ASSIGN(ClientSurfaceEmbedder); | 47 DISALLOW_COPY_AND_ASSIGN(ClientSurfaceEmbedder); |
44 }; | 48 }; |
45 | 49 |
46 } // namespace aura | 50 } // namespace aura |
OLD | NEW |