| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_SURFACES_PENDING_FRAME_OBSERVER_H_ |
| 6 #define CC_SURFACES_PENDING_FRAME_OBSERVER_H_ |
| 7 |
| 8 #include "base/containers/flat_set.h" |
| 9 #include "cc/surfaces/surface_id.h" |
| 10 #include "cc/surfaces/surfaces_export.h" |
| 11 |
| 12 namespace cc { |
| 13 |
| 14 using SurfaceDependencies = base::flat_set<SurfaceId>; |
| 15 |
| 16 class Surface; |
| 17 |
| 18 // Clients that wish to observe when the state of a pending CompostiorFrame |
| 19 // changes should implement this class. |
| 20 class CC_SURFACES_EXPORT PendingFrameObserver { |
| 21 public: |
| 22 // Called when a CompositorFrame within |surface| has activated. |
| 23 virtual void OnSurfaceActivated(Surface* surface) = 0; |
| 24 |
| 25 // Called when the dependencies of a pending CompositorFrame within |surface| |
| 26 // have changed. |
| 27 virtual void OnSurfaceDependenciesChanged( |
| 28 Surface* surface, |
| 29 const SurfaceDependencies& added_dependencies, |
| 30 const SurfaceDependencies& removed_dependencies) = 0; |
| 31 |
| 32 // Called when |surface| is being destroyed. |
| 33 virtual void OnSurfaceDiscarded(Surface* surface) = 0; |
| 34 |
| 35 protected: |
| 36 virtual ~PendingFrameObserver() = default; |
| 37 }; |
| 38 |
| 39 } // namespace cc |
| 40 |
| 41 #endif // CC_SURFACES_PENDING_FRAME_OBSERVER_H_ |
| OLD | NEW |