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

Unified Diff: cc/surfaces/surface_aggregator.cc

Issue 1304063014: cc: Plumbing for BeginFrameSource based on Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
Index: cc/surfaces/surface_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 69618ba8b4ca4507f77705db7fa2834e2a07e452..a81f54791db9ffd4faa01ca437a00bb84c66b5ea 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -461,8 +461,20 @@ void SurfaceAggregator::RemoveUnreferencedChildren() {
}
Surface* surface_ptr = manager_->GetSurfaceForId(surface.first);
- if (surface_ptr)
+ if (surface_ptr) {
surface_ptr->RunDrawCallbacks(SurfaceDrawStatus::DRAW_SKIPPED);
+ // FIXME(brianderson): Make the aggregator take the display_ object.
+ surface_ptr->RemoveDisplay(display_);
+ }
+ }
+ }
+
+ for (const auto& surface : contained_surfaces_) {
+ if (!previous_contained_surfaces_.count(surface.first)) {
+ Surface* surface_ptr = manager_->GetSurfaceForId(surface.first);
+ if (surface_ptr) {
+ surface_ptr->AddDisplay(display_);
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698