| 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 15 matching lines...) Expand all Loading... |
| 26 class CompositorFrame; | 26 class CompositorFrame; |
| 27 class Surface; | 27 class Surface; |
| 28 class SurfaceFactoryClient; | 28 class SurfaceFactoryClient; |
| 29 | 29 |
| 30 class CC_SURFACES_EXPORT SurfaceManager { | 30 class CC_SURFACES_EXPORT SurfaceManager { |
| 31 public: | 31 public: |
| 32 SurfaceManager(); | 32 SurfaceManager(); |
| 33 ~SurfaceManager(); | 33 ~SurfaceManager(); |
| 34 | 34 |
| 35 void RegisterSurface(Surface* surface); | 35 void RegisterSurface(Surface* surface); |
| 36 void DeregisterSurface(SurfaceId surface_id); | 36 void DeregisterSurface(const SurfaceId& surface_id); |
| 37 | 37 |
| 38 // Destroy the Surface once a set of sequence numbers has been satisfied. | 38 // Destroy the Surface once a set of sequence numbers has been satisfied. |
| 39 void Destroy(std::unique_ptr<Surface> surface); | 39 void Destroy(std::unique_ptr<Surface> surface); |
| 40 | 40 |
| 41 Surface* GetSurfaceForId(SurfaceId surface_id); | 41 Surface* GetSurfaceForId(const SurfaceId& surface_id); |
| 42 | 42 |
| 43 void AddObserver(SurfaceDamageObserver* obs) { | 43 void AddObserver(SurfaceDamageObserver* obs) { |
| 44 observer_list_.AddObserver(obs); | 44 observer_list_.AddObserver(obs); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void RemoveObserver(SurfaceDamageObserver* obs) { | 47 void RemoveObserver(SurfaceDamageObserver* obs) { |
| 48 observer_list_.RemoveObserver(obs); | 48 observer_list_.RemoveObserver(obs); |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool SurfaceModified(SurfaceId surface_id); | 51 bool SurfaceModified(const SurfaceId& surface_id); |
| 52 | 52 |
| 53 // A frame for a surface satisfies a set of sequence numbers in a particular | 53 // A frame for a surface satisfies a set of sequence numbers in a particular |
| 54 // id namespace. | 54 // id namespace. |
| 55 void DidSatisfySequences(uint32_t client_id, std::vector<uint32_t>* sequence); | 55 void DidSatisfySequences(uint32_t client_id, std::vector<uint32_t>* sequence); |
| 56 | 56 |
| 57 void RegisterSurfaceClientId(uint32_t client_id); | 57 void RegisterSurfaceClientId(uint32_t client_id); |
| 58 | 58 |
| 59 // Invalidate a namespace that might still have associated sequences, | 59 // Invalidate a namespace that might still have associated sequences, |
| 60 // possibly because a renderer process has crashed. | 60 // possibly because a renderer process has crashed. |
| 61 void InvalidateSurfaceClientId(uint32_t client_id); | 61 void InvalidateSurfaceClientId(uint32_t client_id); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // that is implicitly using this namespace must be reachable by the | 140 // that is implicitly using this namespace must be reachable by the |
| 141 // parent in the dag. | 141 // parent in the dag. |
| 142 std::unordered_map<BeginFrameSource*, uint32_t> registered_sources_; | 142 std::unordered_map<BeginFrameSource*, uint32_t> registered_sources_; |
| 143 | 143 |
| 144 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); | 144 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace cc | 147 } // namespace cc |
| 148 | 148 |
| 149 #endif // CC_SURFACES_SURFACE_MANAGER_H_ | 149 #endif // CC_SURFACES_SURFACE_MANAGER_H_ |
| OLD | NEW |