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

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

Issue 2811813004: Surface Synchronization: Distinguish between dependencies and references (Closed)
Patch Set: Addressed Vlad's comments Created 3 years, 8 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
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
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>* active_referenced_surfaces() const { 104 const std::vector<SurfaceId>* active_referenced_surfaces() const {
105 return active_frame_ ? &active_frame_->metadata.referenced_surfaces 105 return active_frame_ ? &active_frame_->metadata.referenced_surfaces
106 : nullptr; 106 : nullptr;
107 } 107 }
108 108
109 const std::vector<SurfaceId>* pending_referenced_surfaces() const {
110 return pending_frame_ ? &pending_frame_->metadata.referenced_surfaces
111 : nullptr;
112 }
113
114 const SurfaceDependencies& blocking_surfaces() const { 109 const SurfaceDependencies& blocking_surfaces() const {
115 return blocking_surfaces_; 110 return blocking_surfaces_;
116 } 111 }
117 112
118 bool HasActiveFrame() const { return active_frame_.has_value(); } 113 bool HasActiveFrame() const { return active_frame_.has_value(); }
119 bool HasPendingFrame() const { return pending_frame_.has_value(); } 114 bool HasPendingFrame() const { return pending_frame_.has_value(); }
120 115
121 bool destroyed() const { return destroyed_; } 116 bool destroyed() const { return destroyed_; }
122 void set_destroyed(bool destroyed) { destroyed_ = destroyed; } 117 void set_destroyed(bool destroyed) { destroyed_ = destroyed; }
123 118
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 base::ObserverList<PendingFrameObserver, true> observers_; 151 base::ObserverList<PendingFrameObserver, true> observers_;
157 152
158 DrawCallback draw_callback_; 153 DrawCallback draw_callback_;
159 154
160 DISALLOW_COPY_AND_ASSIGN(Surface); 155 DISALLOW_COPY_AND_ASSIGN(Surface);
161 }; 156 };
162 157
163 } // namespace cc 158 } // namespace cc
164 159
165 #endif // CC_SURFACES_SURFACE_H_ 160 #endif // CC_SURFACES_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698