Chromium Code Reviews| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 void SetDependencyTracker( | 60 void SetDependencyTracker( |
| 61 std::unique_ptr<SurfaceDependencyTracker> dependency_tracker); | 61 std::unique_ptr<SurfaceDependencyTracker> dependency_tracker); |
| 62 SurfaceDependencyTracker* dependency_tracker() { | 62 SurfaceDependencyTracker* dependency_tracker() { |
| 63 return dependency_tracker_.get(); | 63 return dependency_tracker_.get(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void RequestSurfaceResolution(Surface* pending_surface); | 66 void RequestSurfaceResolution(Surface* pending_surface); |
| 67 | 67 |
| 68 void RegisterSurface(Surface* surface); | |
| 69 void DeregisterSurface(const SurfaceId& surface_id); | 68 void DeregisterSurface(const SurfaceId& surface_id); |
| 70 | 69 |
| 70 std::unique_ptr<Surface> CreateSurface( | |
|
Fady Samuel
2017/03/09 21:32:16
Here's a safer signature:
std::unique_ptr<Surface
Saman Sami
2017/03/09 21:45:17
I like it.
| |
| 71 SurfaceId surface_id, | |
|
Fady Samuel
2017/03/09 21:32:16
looks like you missed making this const SurfaceId&
Saman Sami
2017/03/09 21:45:17
Done.
| |
| 72 base::WeakPtr<SurfaceFactory> surface_factory); | |
| 73 | |
| 71 // Destroy the Surface once a set of sequence numbers has been satisfied. | 74 // Destroy the Surface once a set of sequence numbers has been satisfied. |
| 72 void Destroy(std::unique_ptr<Surface> surface); | 75 void DestroySurface(std::unique_ptr<Surface> surface); |
| 73 | 76 |
| 74 Surface* GetSurfaceForId(const SurfaceId& surface_id); | 77 Surface* GetSurfaceForId(const SurfaceId& surface_id); |
| 75 | 78 |
| 76 void AddObserver(SurfaceObserver* obs) { observer_list_.AddObserver(obs); } | 79 void AddObserver(SurfaceObserver* obs) { observer_list_.AddObserver(obs); } |
| 77 | 80 |
| 78 void RemoveObserver(SurfaceObserver* obs) { | 81 void RemoveObserver(SurfaceObserver* obs) { |
| 79 observer_list_.RemoveObserver(obs); | 82 observer_list_.RemoveObserver(obs); |
| 80 } | 83 } |
| 81 | 84 |
| 82 bool SurfaceModified(const SurfaceId& surface_id); | 85 bool SurfaceModified(const SurfaceId& surface_id); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 308 std::unique_ptr<SurfaceDependencyTracker> dependency_tracker_; | 311 std::unique_ptr<SurfaceDependencyTracker> dependency_tracker_; |
| 309 | 312 |
| 310 base::WeakPtrFactory<SurfaceManager> weak_factory_; | 313 base::WeakPtrFactory<SurfaceManager> weak_factory_; |
| 311 | 314 |
| 312 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); | 315 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); |
| 313 }; | 316 }; |
| 314 | 317 |
| 315 } // namespace cc | 318 } // namespace cc |
| 316 | 319 |
| 317 #endif // CC_SURFACES_SURFACE_MANAGER_H_ | 320 #endif // CC_SURFACES_SURFACE_MANAGER_H_ |
| OLD | NEW |