| 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_MUS_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ | 5 #ifndef COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ |
| 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ | 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // than the size of the window. | 57 // than the size of the window. |
| 58 bool IsSurfaceReadyAndNonEmpty(mojom::SurfaceType type) const; | 58 bool IsSurfaceReadyAndNonEmpty(mojom::SurfaceType type) const; |
| 59 | 59 |
| 60 cc::SurfaceId GenerateId(); | 60 cc::SurfaceId GenerateId(); |
| 61 | 61 |
| 62 ServerWindow* window_; | 62 ServerWindow* window_; |
| 63 | 63 |
| 64 cc::SurfaceIdAllocator surface_id_allocator_; | 64 cc::SurfaceIdAllocator surface_id_allocator_; |
| 65 | 65 |
| 66 using TypeToSurfaceMap = | 66 using TypeToSurfaceMap = |
| 67 std::map<mojom::SurfaceType, scoped_ptr<ServerWindowSurface>>; | 67 std::map<mojom::SurfaceType, std::unique_ptr<ServerWindowSurface>>; |
| 68 | 68 |
| 69 TypeToSurfaceMap type_to_surface_map_; | 69 TypeToSurfaceMap type_to_surface_map_; |
| 70 | 70 |
| 71 // While true the window is not drawn. This is initially true if the window | 71 // While true the window is not drawn. This is initially true if the window |
| 72 // has the property |kWaitForUnderlay_Property|. This is set to false once | 72 // has the property |kWaitForUnderlay_Property|. This is set to false once |
| 73 // the underlay and default surface have been set *and* their size is at | 73 // the underlay and default surface have been set *and* their size is at |
| 74 // least that of the window. Ideally we would wait for sizes to match, but | 74 // least that of the window. Ideally we would wait for sizes to match, but |
| 75 // the underlay is not necessarily as big as the window. | 75 // the underlay is not necessarily as big as the window. |
| 76 bool waiting_for_initial_frames_; | 76 bool waiting_for_initial_frames_; |
| 77 | 77 |
| 78 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurfaceManager); | 78 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurfaceManager); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace ws | 81 } // namespace ws |
| 82 } // namespace mus | 82 } // namespace mus |
| 83 | 83 |
| 84 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ | 84 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ |
| OLD | NEW |