OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CC_SURFACES_SURFACE_MANAGER_H_ | 5 #ifndef CC_SURFACES_SURFACE_MANAGER_H_ |
6 #define CC_SURFACES_SURFACE_MANAGER_H_ | 6 #define CC_SURFACES_SURFACE_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
11 #include <unordered_map> | 11 #include <unordered_map> |
| 12 #include <unordered_set> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "base/containers/hash_tables.h" | |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
18 #include "cc/surfaces/surface_damage_observer.h" | 18 #include "cc/surfaces/surface_damage_observer.h" |
19 #include "cc/surfaces/surface_id.h" | 19 #include "cc/surfaces/surface_id.h" |
20 #include "cc/surfaces/surface_sequence.h" | 20 #include "cc/surfaces/surface_sequence.h" |
21 #include "cc/surfaces/surfaces_export.h" | 21 #include "cc/surfaces/surfaces_export.h" |
22 | 22 |
23 namespace cc { | 23 namespace cc { |
24 class CompositorFrame; | 24 class CompositorFrame; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 base::ObserverList<SurfaceDamageObserver> observer_list_; | 66 base::ObserverList<SurfaceDamageObserver> observer_list_; |
67 base::ThreadChecker thread_checker_; | 67 base::ThreadChecker thread_checker_; |
68 | 68 |
69 // List of surfaces to be destroyed, along with what sequences they're still | 69 // List of surfaces to be destroyed, along with what sequences they're still |
70 // waiting on. | 70 // waiting on. |
71 using SurfaceDestroyList = std::list<Surface*>; | 71 using SurfaceDestroyList = std::list<Surface*>; |
72 SurfaceDestroyList surfaces_to_destroy_; | 72 SurfaceDestroyList surfaces_to_destroy_; |
73 | 73 |
74 // Set of SurfaceSequences that have been satisfied by a frame but not yet | 74 // Set of SurfaceSequences that have been satisfied by a frame but not yet |
75 // waited on. | 75 // waited on. |
76 base::hash_set<SurfaceSequence> satisfied_sequences_; | 76 std::unordered_set<SurfaceSequence, SurfaceSequenceHash> satisfied_sequences_; |
77 | 77 |
78 // Set of valid surface ID namespaces. When a namespace is removed from | 78 // Set of valid surface ID namespaces. When a namespace is removed from |
79 // this set, any remaining sequences with that namespace are considered | 79 // this set, any remaining sequences with that namespace are considered |
80 // satisfied. | 80 // satisfied. |
81 base::hash_set<uint32_t> valid_surface_id_namespaces_; | 81 std::unordered_set<uint32_t> valid_surface_id_namespaces_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); | 83 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace cc | 86 } // namespace cc |
87 | 87 |
88 #endif // CC_SURFACES_SURFACE_MANAGER_H_ | 88 #endif // CC_SURFACES_SURFACE_MANAGER_H_ |
OLD | NEW |