OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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_DEPENDENCY_TRACKER_H_ | 5 #ifndef CC_SURFACES_SURFACE_DEPENDENCY_TRACKER_H_ |
6 #define CC_SURFACES_SURFACE_DEPENDENCY_TRACKER_H_ | 6 #define CC_SURFACES_SURFACE_DEPENDENCY_TRACKER_H_ |
7 | 7 |
8 #include "cc/scheduler/begin_frame_source.h" | 8 #include "cc/scheduler/begin_frame_source.h" |
9 #include "cc/surfaces/pending_frame_observer.h" | 9 #include "cc/surfaces/pending_frame_observer.h" |
10 #include "cc/surfaces/surface.h" | 10 #include "cc/surfaces/surface.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // BeginFrameObserver implementation. | 47 // BeginFrameObserver implementation. |
48 void OnBeginFrame(const BeginFrameArgs& args) override; | 48 void OnBeginFrame(const BeginFrameArgs& args) override; |
49 const BeginFrameArgs& LastUsedBeginFrameArgs() const override; | 49 const BeginFrameArgs& LastUsedBeginFrameArgs() const override; |
50 void OnBeginFrameSourcePausedChanged(bool paused) override; | 50 void OnBeginFrameSourcePausedChanged(bool paused) override; |
51 | 51 |
52 // PendingFrameObserver implementation: | 52 // PendingFrameObserver implementation: |
53 void OnSurfaceActivated(Surface* surface) override; | 53 void OnSurfaceActivated(Surface* surface) override; |
54 void OnSurfaceDependenciesChanged( | 54 void OnSurfaceDependenciesChanged( |
55 Surface* surface, | 55 Surface* surface, |
56 const SurfaceDependencies& added_dependencies, | 56 const base::flat_set<SurfaceId>& added_dependencies, |
57 const SurfaceDependencies& removed_dependencies) override; | 57 const base::flat_set<SurfaceId>& removed_dependencies) override; |
58 void OnSurfaceDiscarded(Surface* surface) override; | 58 void OnSurfaceDiscarded(Surface* surface) override; |
59 | 59 |
60 // SurfaceObserver implementation: | 60 // SurfaceObserver implementation: |
61 void OnSurfaceCreated(const SurfaceInfo& surface_info) override; | 61 void OnSurfaceCreated(const SurfaceInfo& surface_info) override; |
62 void OnSurfaceDamaged(const SurfaceId& surface_id, bool* changed) override; | 62 void OnSurfaceDamaged(const SurfaceId& surface_id, bool* changed) override; |
63 | 63 |
64 private: | 64 private: |
65 // Informs all Surfaces with pending frames blocked on the provided | 65 // Informs all Surfaces with pending frames blocked on the provided |
66 // |surface_id| that there is now an active frame available in Surface | 66 // |surface_id| that there is now an active frame available in Surface |
67 // corresponding to |surface_id|. | 67 // corresponding to |surface_id|. |
(...skipping 22 matching lines...) Expand all Loading... |
90 // The set of SurfaceIds to which corresponding CompositorFrames have not | 90 // The set of SurfaceIds to which corresponding CompositorFrames have not |
91 // arrived by the time their deadline fired. | 91 // arrived by the time their deadline fired. |
92 base::flat_set<SurfaceId> late_surfaces_by_id_; | 92 base::flat_set<SurfaceId> late_surfaces_by_id_; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(SurfaceDependencyTracker); | 94 DISALLOW_COPY_AND_ASSIGN(SurfaceDependencyTracker); |
95 }; | 95 }; |
96 | 96 |
97 } // namespace cc | 97 } // namespace cc |
98 | 98 |
99 #endif // CC_SURFACES_SURFACE_DEPENDENCY_TRACKER_H_ | 99 #endif // CC_SURFACES_SURFACE_DEPENDENCY_TRACKER_H_ |
OLD | NEW |