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

Unified Diff: blimp/client/support/compositor/blimp_embedder_compositor.cc

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId (Closed)
Patch Set: Rebased Created 4 years, 2 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 | « blimp/client/support/compositor/blimp_embedder_compositor.h ('k') | cc/output/compositor_frame_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/support/compositor/blimp_embedder_compositor.cc
diff --git a/blimp/client/support/compositor/blimp_embedder_compositor.cc b/blimp/client/support/compositor/blimp_embedder_compositor.cc
index 62eb7415d0551e34a00f55994975fe082018298f..0e41f74d91dc633107c7892bd364e6bd69c9a482 100644
--- a/blimp/client/support/compositor/blimp_embedder_compositor.cc
+++ b/blimp/client/support/compositor/blimp_embedder_compositor.cc
@@ -85,12 +85,11 @@ base::LazyInstance<SimpleTaskGraphRunner> g_task_graph_runner =
BlimpEmbedderCompositor::BlimpEmbedderCompositor(
CompositorDependencies* compositor_dependencies)
: compositor_dependencies_(compositor_dependencies),
- surface_id_allocator_(base::MakeUnique<cc::SurfaceIdAllocator>(
- compositor_dependencies->AllocateFrameSinkId())),
+ frame_sink_id_(compositor_dependencies->AllocateFrameSinkId()),
compositor_frame_sink_request_pending_(false),
root_layer_(cc::Layer::Create()) {
compositor_dependencies_->GetSurfaceManager()->RegisterFrameSinkId(
- surface_id_allocator_->frame_sink_id());
+ frame_sink_id_);
cc::LayerTreeHostInProcess::InitParams params;
params.client = this;
@@ -105,14 +104,14 @@ BlimpEmbedderCompositor::BlimpEmbedderCompositor(
root_layer_->SetBackgroundColor(SK_ColorWHITE);
host_->GetLayerTree()->SetRootLayer(root_layer_);
- host_->SetFrameSinkId(surface_id_allocator_->frame_sink_id());
+ host_->SetFrameSinkId(frame_sink_id_);
host_->SetVisible(true);
}
BlimpEmbedderCompositor::~BlimpEmbedderCompositor() {
SetContextProvider(nullptr);
compositor_dependencies_->GetSurfaceManager()->InvalidateFrameSinkId(
- surface_id_allocator_->frame_sink_id());
+ frame_sink_id_);
}
void BlimpEmbedderCompositor::SetContentLayer(
@@ -201,8 +200,8 @@ void BlimpEmbedderCompositor::HandlePendingCompositorFrameSinkRequest() {
// The Browser compositor and display share the same context provider.
auto compositor_frame_sink = base::MakeUnique<cc::DirectCompositorFrameSink>(
- compositor_dependencies_->GetSurfaceManager(),
- surface_id_allocator_.get(), display_.get(), context_provider_, nullptr);
+ frame_sink_id_, compositor_dependencies_->GetSurfaceManager(),
+ display_.get(), context_provider_, nullptr);
host_->SetCompositorFrameSink(std::move(compositor_frame_sink));
}
« no previous file with comments | « blimp/client/support/compositor/blimp_embedder_compositor.h ('k') | cc/output/compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698