| 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_H_ | 5 #ifndef CC_SURFACES_SURFACE_H_ |
| 6 #define CC_SURFACES_SURFACE_H_ | 6 #define CC_SURFACES_SURFACE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 std::unordered_set<SurfaceSequence, SurfaceSequenceHash>* sequences, | 98 std::unordered_set<SurfaceSequence, SurfaceSequenceHash>* sequences, |
| 99 std::unordered_set<FrameSinkId, FrameSinkIdHash>* valid_id_namespaces); | 99 std::unordered_set<FrameSinkId, FrameSinkIdHash>* valid_id_namespaces); |
| 100 size_t GetDestructionDependencyCount() const { | 100 size_t GetDestructionDependencyCount() const { |
| 101 return destruction_dependencies_.size(); | 101 return destruction_dependencies_.size(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 const std::vector<SurfaceId>& referenced_surfaces() const { | 104 const std::vector<SurfaceId>& referenced_surfaces() const { |
| 105 return referenced_surfaces_; | 105 return referenced_surfaces_; |
| 106 } | 106 } |
| 107 | 107 |
| 108 const std::vector<SurfaceId>& pending_referenced_surfaces() const { |
| 109 return pending_referenced_surfaces_; |
| 110 } |
| 111 |
| 108 const SurfaceDependencies& blocking_surfaces_for_testing() const { | 112 const SurfaceDependencies& blocking_surfaces_for_testing() const { |
| 109 return blocking_surfaces_; | 113 return blocking_surfaces_; |
| 110 } | 114 } |
| 111 | 115 |
| 112 bool HasActiveFrame() const { return active_frame_.has_value(); } | 116 bool HasActiveFrame() const { return active_frame_.has_value(); } |
| 113 bool HasPendingFrame() const { return pending_frame_.has_value(); } | 117 bool HasPendingFrame() const { return pending_frame_.has_value(); } |
| 114 | 118 |
| 115 bool destroyed() const { return destroyed_; } | 119 bool destroyed() const { return destroyed_; } |
| 116 void set_destroyed(bool destroyed) { destroyed_ = destroyed; } | 120 void set_destroyed(bool destroyed) { destroyed_ = destroyed; } |
| 117 | 121 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 136 bool destroyed_; | 140 bool destroyed_; |
| 137 std::vector<SurfaceSequence> destruction_dependencies_; | 141 std::vector<SurfaceSequence> destruction_dependencies_; |
| 138 | 142 |
| 139 // This surface may have multiple BeginFrameSources if it is | 143 // This surface may have multiple BeginFrameSources if it is |
| 140 // on multiple Displays. | 144 // on multiple Displays. |
| 141 std::set<BeginFrameSource*> begin_frame_sources_; | 145 std::set<BeginFrameSource*> begin_frame_sources_; |
| 142 | 146 |
| 143 // The total set of CompositorFrames referenced by the active CompositorFrame. | 147 // The total set of CompositorFrames referenced by the active CompositorFrame. |
| 144 std::vector<SurfaceId> referenced_surfaces_; | 148 std::vector<SurfaceId> referenced_surfaces_; |
| 145 | 149 |
| 150 // The total set of SurfaceIds referenced by the pending CompositorFrame. |
| 151 std::vector<SurfaceId> pending_referenced_surfaces_; |
| 152 |
| 146 SurfaceDependencies blocking_surfaces_; | 153 SurfaceDependencies blocking_surfaces_; |
| 147 base::ObserverList<PendingFrameObserver, true> observers_; | 154 base::ObserverList<PendingFrameObserver, true> observers_; |
| 148 | 155 |
| 149 DrawCallback draw_callback_; | 156 DrawCallback draw_callback_; |
| 150 | 157 |
| 151 DISALLOW_COPY_AND_ASSIGN(Surface); | 158 DISALLOW_COPY_AND_ASSIGN(Surface); |
| 152 }; | 159 }; |
| 153 | 160 |
| 154 using PendingSurfaceSet = base::flat_set<Surface*>; | 161 using PendingSurfaceSet = base::flat_set<Surface*>; |
| 155 | 162 |
| 156 } // namespace cc | 163 } // namespace cc |
| 157 | 164 |
| 158 #endif // CC_SURFACES_SURFACE_H_ | 165 #endif // CC_SURFACES_SURFACE_H_ |
| OLD | NEW |