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

Unified Diff: cc/surfaces/display.cc

Issue 1673783004: Hook up BeginFrameSource to SurfaceFactoryClient via SurfaceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Register id namespace on Android Created 4 years, 9 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/display.h ('k') | cc/surfaces/display_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index b8ba195994aa733564798e0b0404f698faf2dce6..6866cedc9cf27654d5e0ebcee75cbda329dae739 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -56,6 +56,7 @@ Display::~Display() {
bool Display::Initialize(scoped_ptr<OutputSurface> output_surface,
DisplayScheduler* scheduler) {
+ // TODO(enne): register/unregister BeginFrameSource with SurfaceManager here.
output_surface_ = std::move(output_surface);
scheduler_ = scheduler;
return output_surface_->BindToClient(this);
@@ -134,8 +135,8 @@ void Display::InitializeRenderer() {
// overlays.
bool output_partial_list = renderer_->Capabilities().using_partial_swap &&
!output_surface_->GetOverlayCandidateValidator();
- aggregator_.reset(new SurfaceAggregator(
- this, manager_, resource_provider_.get(), output_partial_list));
+ aggregator_.reset(new SurfaceAggregator(manager_, resource_provider_.get(),
+ output_partial_list));
}
void Display::DidLoseOutputSurface() {
@@ -153,31 +154,6 @@ void Display::UpdateRootSurfaceResourcesLocked() {
scheduler_->SetRootSurfaceResourcesLocked(root_surface_resources_locked);
}
-void Display::AddSurface(Surface* surface) {
- // Checking for the output_surface ensures Display::Initialize has been
- // called and that scheduler_ won't change its value.
- DCHECK(output_surface_);
-
- // WebView's HardwareRenderer will never have a scheduler.
- if (!scheduler_)
- return;
-
- surface->AddBeginFrameSource(scheduler_->begin_frame_source_for_children());
-}
-
-void Display::RemoveSurface(Surface* surface) {
- // Checking for the output_surface ensures Display::Initialize has been
- // called and that scheduler_ won't change its value.
- DCHECK(output_surface_);
-
- // WebView's HardwareRenderer will never have a scheduler.
- if (!scheduler_)
- return;
-
- surface->RemoveBeginFrameSource(
- scheduler_->begin_frame_source_for_children());
-}
-
bool Display::DrawAndSwap() {
TRACE_EVENT0("cc", "Display::DrawAndSwap");
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698