Index: cc/surfaces/display.cc |
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc |
index 329575fe4406dd4975fc04bf13c71d20d580e258..79acc399ad29eff68d000bdfad0c5ee925a2f562 100644 |
--- a/cc/surfaces/display.cc |
+++ b/cc/surfaces/display.cc |
@@ -131,8 +131,8 @@ void Display::InitializeRenderer() { |
// overlays. |
bool output_partial_list = renderer_->Capabilities().using_partial_swap && |
!output_surface_->GetOverlayCandidateValidator(); |
- aggregator_.reset(new SurfaceAggregator(manager_, resource_provider_.get(), |
- output_partial_list)); |
+ aggregator_.reset(new SurfaceAggregator( |
+ this, manager_, resource_provider_.get(), output_partial_list)); |
} |
void Display::DidLoseOutputSurface() { |
@@ -150,6 +150,17 @@ void Display::UpdateRootSurfaceResourcesLocked() { |
scheduler_->SetRootSurfaceResourcesLocked(root_surface_resources_locked); |
} |
+void Display::AddSurface(Surface* surface) { |
+ DCHECK(scheduler_); |
+ surface->AddBeginFrameSource(scheduler_->begin_frame_source_for_children()); |
+} |
+ |
+void Display::RemoveSurface(Surface* surface) { |
+ DCHECK(scheduler_); |
+ surface->RemoveBeginFrameSource( |
+ scheduler_->begin_frame_source_for_children()); |
+} |
+ |
bool Display::DrawAndSwap() { |
TRACE_EVENT0("cc", "Display::DrawAndSwap"); |