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

Unified Diff: cc/surfaces/surface.h

Issue 2688043002: Retain references to surfaces from both active AND pending CompositorFrames (Closed)
Patch Set: Added TODOs and addressed comments Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support_unittest.cc ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface.h
diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
index a427a8224fc45eb142d1b30e558c5d38dac50392..e8fbccff00fae818633acbeb6862703b356d5916 100644
--- a/cc/surfaces/surface.h
+++ b/cc/surfaces/surface.h
@@ -101,8 +101,12 @@ class CC_SURFACES_EXPORT Surface {
return destruction_dependencies_.size();
}
- const std::vector<SurfaceId>& referenced_surfaces() const {
- return referenced_surfaces_;
+ const std::vector<SurfaceId>& active_referenced_surfaces() const {
+ return active_referenced_surfaces_;
+ }
+
+ const std::vector<SurfaceId>& pending_referenced_surfaces() const {
+ return pending_referenced_surfaces_;
}
const SurfaceDependencies& blocking_surfaces_for_testing() const {
@@ -140,8 +144,19 @@ class CC_SURFACES_EXPORT Surface {
// on multiple Displays.
std::set<BeginFrameSource*> begin_frame_sources_;
- // The total set of CompositorFrames referenced by the active CompositorFrame.
- std::vector<SurfaceId> referenced_surfaces_;
+ // The set of SurfaceIds referenced by the active CompositorFrame.
+ // TODO(fsamuel): It seems unnecessary to copy this vector over
+ // from CompostiorFrameMetadata to store locally here. We can simply
+ // provide an accessor to the referenced surfaces directly from
+ // CompositorFrameMetadata.
+ std::vector<SurfaceId> active_referenced_surfaces_;
+
+ // The set of SurfaceIds referenced by the pending CompositorFrame.
+ // TODO(fsamuel): It seems unnecessary to copy this vector over
+ // from CompostiorFrameMetadata to store locally here. We can simply
+ // provide an accessor to the referenced surfaces directly from
+ // CompositorFrameMetadata.
+ std::vector<SurfaceId> pending_referenced_surfaces_;
SurfaceDependencies blocking_surfaces_;
base::ObserverList<PendingFrameObserver, true> observers_;
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support_unittest.cc ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698