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

Unified Diff: android_webview/browser/surfaces_instance.cc

Issue 2565783002: Moves ownership of the cc::Display's BeginFrameSource out of Display. (Closed)
Patch Set: rebase. Created 4 years 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: android_webview/browser/surfaces_instance.cc
diff --git a/android_webview/browser/surfaces_instance.cc b/android_webview/browser/surfaces_instance.cc
index f16fe5e0c29b7bc491eca366ff9ec3e2cecc1445..4460c59adfb63e93d99ce90380cbed4851996a2b 100644
--- a/android_webview/browser/surfaces_instance.cc
+++ b/android_webview/browser/surfaces_instance.cc
@@ -55,8 +55,7 @@ SurfacesInstance::SurfacesInstance()
surface_factory_.reset(
new cc::SurfaceFactory(frame_sink_id_, surface_manager_.get(), this));
- std::unique_ptr<cc::BeginFrameSource> begin_frame_source(
- new cc::StubBeginFrameSource);
+ begin_frame_source_.reset(new cc::StubBeginFrameSource);
std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter(
new cc::TextureMailboxDeleter(nullptr));
std::unique_ptr<ParentOutputSurface> output_surface_holder(
@@ -65,12 +64,11 @@ SurfacesInstance::SurfacesInstance()
DeferredGpuCommandService::GetInstance())));
output_surface_ = output_surface_holder.get();
std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
- begin_frame_source.get(), nullptr,
- output_surface_holder->capabilities().max_frames_pending));
+ nullptr, output_surface_holder->capabilities().max_frames_pending));
display_.reset(new cc::Display(
nullptr /* shared_bitmap_manager */,
nullptr /* gpu_memory_buffer_manager */, settings, frame_sink_id_,
- std::move(begin_frame_source), std::move(output_surface_holder),
+ begin_frame_source_.get(), std::move(output_surface_holder),
std::move(scheduler), std::move(texture_mailbox_deleter)));
display_->Initialize(this, surface_manager_.get());
display_->SetVisible(true);
« no previous file with comments | « android_webview/browser/surfaces_instance.h ('k') | blimp/client/support/compositor/blimp_embedder_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698