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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 | 67 |
| 68 void RequestSurfaceResolution(Surface* pending_surface); | 68 void RequestSurfaceResolution(Surface* pending_surface); |
| 69 | 69 |
| 70 std::unique_ptr<Surface> CreateSurface( | 70 std::unique_ptr<Surface> CreateSurface( |
| 71 base::WeakPtr<CompositorFrameSinkSupport> compositor_frame_sink_support, | 71 base::WeakPtr<CompositorFrameSinkSupport> compositor_frame_sink_support, |
| 72 const SurfaceInfo& surface_info); | 72 const SurfaceInfo& surface_info); |
| 73 | 73 |
| 74 // 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. |
| 75 void DestroySurface(std::unique_ptr<Surface> surface); | 75 void DestroySurface(std::unique_ptr<Surface> surface); |
| 76 | 76 |
| 77 // Called when a surface has been added to the Display Frame and will | |
|
danakj
2017/06/14 18:53:12
Display Frame is written like it is a type, but I
gklassen
2017/06/14 19:29:11
Good call. Your suggestion makes the description
| |
| 78 // invoke observers with the OnSurfaceWillDraw notification. | |
| 79 void SurfaceWillDraw(const SurfaceId& surface_id); | |
| 80 | |
| 77 Surface* GetSurfaceForId(const SurfaceId& surface_id); | 81 Surface* GetSurfaceForId(const SurfaceId& surface_id); |
| 78 | 82 |
| 79 void AddObserver(SurfaceObserver* obs) { observer_list_.AddObserver(obs); } | 83 void AddObserver(SurfaceObserver* obs) { observer_list_.AddObserver(obs); } |
| 80 | 84 |
| 81 void RemoveObserver(SurfaceObserver* obs) { | 85 void RemoveObserver(SurfaceObserver* obs) { |
| 82 observer_list_.RemoveObserver(obs); | 86 observer_list_.RemoveObserver(obs); |
| 83 } | 87 } |
| 84 | 88 |
| 85 // Called when a Surface is modified, e.g. when a CompositorFrame is | 89 // Called when a Surface is modified, e.g. when a CompositorFrame is |
| 86 // activated, its producer confirms that no CompositorFrame will be submitted | 90 // activated, its producer confirms that no CompositorFrame will be submitted |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 326 SurfaceDependencyTracker* dependency_tracker_ = nullptr; | 330 SurfaceDependencyTracker* dependency_tracker_ = nullptr; |
| 327 | 331 |
| 328 base::WeakPtrFactory<SurfaceManager> weak_factory_; | 332 base::WeakPtrFactory<SurfaceManager> weak_factory_; |
| 329 | 333 |
| 330 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); | 334 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); |
| 331 }; | 335 }; |
| 332 | 336 |
| 333 } // namespace cc | 337 } // namespace cc |
| 334 | 338 |
| 335 #endif // CC_SURFACES_SURFACE_MANAGER_H_ | 339 #endif // CC_SURFACES_SURFACE_MANAGER_H_ |
| OLD | NEW |