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> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void RemoveObserver(SurfaceObserver* obs) { | 56 void RemoveObserver(SurfaceObserver* obs) { |
57 observer_list_.RemoveObserver(obs); | 57 observer_list_.RemoveObserver(obs); |
58 } | 58 } |
59 | 59 |
60 bool SurfaceModified(const SurfaceId& surface_id); | 60 bool SurfaceModified(const SurfaceId& surface_id); |
61 | 61 |
62 // Called when a CompositorFrame is submitted to a SurfaceFactory for a given | 62 // Called when a CompositorFrame is submitted to a SurfaceFactory for a given |
63 // |surface_id| for the first time. | 63 // |surface_id| for the first time. |
64 void SurfaceCreated(const SurfaceInfo& surface_info); | 64 void SurfaceCreated(const SurfaceInfo& surface_info); |
65 | 65 |
66 // A frame for a surface satisfies a set of sequence numbers in a particular | 66 // Require that the given sequence number must be satisfied (using |
67 // id namespace. | 67 // SatisfySequence) before the given surface can be destroyed. |
68 void DidSatisfySequences(const FrameSinkId& frame_sink_id, | 68 void RequireSequence(const SurfaceId& surface_id, |
69 std::vector<uint32_t>* sequence); | 69 const SurfaceSequence& sequence); |
| 70 |
| 71 // Satisfies the given sequence number. Once all sequence numbers that |
| 72 // a surface depends on are satisfied, the surface can be destroyed. |
| 73 void SatisfySequence(const SurfaceSequence& sequence); |
70 | 74 |
71 void RegisterFrameSinkId(const FrameSinkId& frame_sink_id); | 75 void RegisterFrameSinkId(const FrameSinkId& frame_sink_id); |
72 | 76 |
73 // Invalidate a frame_sink_id that might still have associated sequences, | 77 // Invalidate a frame_sink_id that might still have associated sequences, |
74 // possibly because a renderer process has crashed. | 78 // possibly because a renderer process has crashed. |
75 void InvalidateFrameSinkId(const FrameSinkId& frame_sink_id); | 79 void InvalidateFrameSinkId(const FrameSinkId& frame_sink_id); |
76 | 80 |
77 // SurfaceFactoryClient, hierarchy, and BeginFrameSource can be registered | 81 // SurfaceFactoryClient, hierarchy, and BeginFrameSource can be registered |
78 // and unregistered in any order with respect to each other. | 82 // and unregistered in any order with respect to each other. |
79 // | 83 // |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 scoped_refptr<SurfaceReferenceFactory> reference_factory_; | 209 scoped_refptr<SurfaceReferenceFactory> reference_factory_; |
206 | 210 |
207 base::WeakPtrFactory<SurfaceManager> weak_factory_; | 211 base::WeakPtrFactory<SurfaceManager> weak_factory_; |
208 | 212 |
209 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); | 213 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); |
210 }; | 214 }; |
211 | 215 |
212 } // namespace cc | 216 } // namespace cc |
213 | 217 |
214 #endif // CC_SURFACES_SURFACE_MANAGER_H_ | 218 #endif // CC_SURFACES_SURFACE_MANAGER_H_ |
OLD | NEW |