Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: cc/surfaces/surface.h

Issue 2861713003: cc: Remove SurfaceDependencies type (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/surfaces/pending_frame_observer.h ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 size_t GetDestructionDependencyCount() const { 107 size_t GetDestructionDependencyCount() const {
108 return destruction_dependencies_.size(); 108 return destruction_dependencies_.size();
109 } 109 }
110 110
111 const std::vector<SurfaceId>* active_referenced_surfaces() const { 111 const std::vector<SurfaceId>* active_referenced_surfaces() const {
112 return active_frame_data_ 112 return active_frame_data_
113 ? &active_frame_data_->frame.metadata.referenced_surfaces 113 ? &active_frame_data_->frame.metadata.referenced_surfaces
114 : nullptr; 114 : nullptr;
115 } 115 }
116 116
117 const SurfaceDependencies& blocking_surfaces() const { 117 const base::flat_set<SurfaceId>& blocking_surfaces() const {
118 return blocking_surfaces_; 118 return blocking_surfaces_;
119 } 119 }
120 120
121 bool HasActiveFrame() const { return active_frame_data_.has_value(); } 121 bool HasActiveFrame() const { return active_frame_data_.has_value(); }
122 bool HasPendingFrame() const { return pending_frame_data_.has_value(); } 122 bool HasPendingFrame() const { return pending_frame_data_.has_value(); }
123 123
124 bool destroyed() const { return destroyed_; } 124 bool destroyed() const { return destroyed_; }
125 void set_destroyed(bool destroyed) { destroyed_ = destroyed; } 125 void set_destroyed(bool destroyed) { destroyed_ = destroyed; }
126 126
127 private: 127 private:
(...skipping 28 matching lines...) Expand all
156 SurfaceId surface_id_; 156 SurfaceId surface_id_;
157 SurfaceId previous_frame_surface_id_; 157 SurfaceId previous_frame_surface_id_;
158 base::WeakPtr<SurfaceFactory> factory_; 158 base::WeakPtr<SurfaceFactory> factory_;
159 159
160 base::Optional<FrameData> pending_frame_data_; 160 base::Optional<FrameData> pending_frame_data_;
161 base::Optional<FrameData> active_frame_data_; 161 base::Optional<FrameData> active_frame_data_;
162 int frame_index_; 162 int frame_index_;
163 bool destroyed_; 163 bool destroyed_;
164 std::vector<SurfaceSequence> destruction_dependencies_; 164 std::vector<SurfaceSequence> destruction_dependencies_;
165 165
166 SurfaceDependencies blocking_surfaces_; 166 base::flat_set<SurfaceId> blocking_surfaces_;
167 base::ObserverList<PendingFrameObserver, true> observers_; 167 base::ObserverList<PendingFrameObserver, true> observers_;
168 168
169 DISALLOW_COPY_AND_ASSIGN(Surface); 169 DISALLOW_COPY_AND_ASSIGN(Surface);
170 }; 170 };
171 171
172 } // namespace cc 172 } // namespace cc
173 173
174 #endif // CC_SURFACES_SURFACE_H_ 174 #endif // CC_SURFACES_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/surfaces/pending_frame_observer.h ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698