Index: content/renderer/android/synchronous_compositor_frame_sink.cc |
diff --git a/content/renderer/android/synchronous_compositor_frame_sink.cc b/content/renderer/android/synchronous_compositor_frame_sink.cc |
index ce28e99c3c3d32ab0ac8f8c12fd199501dd0e56f..4b43874b6f5f6f364cd5c0b5ec2dd16f1d9878c8 100644 |
--- a/content/renderer/android/synchronous_compositor_frame_sink.cc |
+++ b/content/renderer/android/synchronous_compositor_frame_sink.cc |
@@ -45,7 +45,7 @@ namespace content { |
namespace { |
const int64_t kFallbackTickTimeoutInMilliseconds = 100; |
-const cc::FrameSinkId kCompositorFrameSinkId(1, 1); |
+const cc::FrameSinkId kFrameSinkId(1, 1); |
// Do not limit number of resources, so use an unrealistically high value. |
const size_t kNumResourcesLimit = 10 * 1000 * 1000; |
@@ -120,8 +120,9 @@ SynchronousCompositorFrameSink::SynchronousCompositorFrameSink( |
memory_policy_(0u), |
frame_swap_message_queue_(frame_swap_message_queue), |
surface_manager_(new cc::SurfaceManager), |
- surface_id_allocator_(new cc::SurfaceIdAllocator(kCompositorFrameSinkId)), |
- surface_factory_(new cc::SurfaceFactory(surface_manager_.get(), this)), |
+ surface_id_allocator_(new cc::SurfaceIdAllocator(kFrameSinkId)), |
+ surface_factory_( |
+ new cc::SurfaceFactory(kFrameSinkId, surface_manager_.get(), this)), |
begin_frame_source_(std::move(begin_frame_source)) { |
DCHECK(registry_); |
DCHECK(sender_); |
@@ -167,9 +168,8 @@ bool SynchronousCompositorFrameSink::BindToClient( |
registry_->RegisterCompositorFrameSink(routing_id_, this); |
registered_ = true; |
- surface_manager_->RegisterFrameSinkId(surface_id_allocator_->frame_sink_id()); |
- surface_manager_->RegisterSurfaceFactoryClient( |
- surface_id_allocator_->frame_sink_id(), this); |
+ surface_manager_->RegisterFrameSinkId(kFrameSinkId); |
+ surface_manager_->RegisterSurfaceFactoryClient(kFrameSinkId, this); |
cc::RendererSettings software_renderer_settings; |
@@ -187,8 +187,7 @@ bool SynchronousCompositorFrameSink::BindToClient( |
nullptr /* gpu_memory_buffer_manager */, software_renderer_settings, |
nullptr /* begin_frame_source */, std::move(compositor_frame_sink), |
nullptr /* scheduler */, nullptr /* texture_mailbox_deleter */)); |
- display_->Initialize(&display_client_, surface_manager_.get(), |
- surface_id_allocator_->frame_sink_id()); |
+ display_->Initialize(&display_client_, surface_manager_.get(), kFrameSinkId); |
display_->SetVisible(true); |
return true; |
} |
@@ -203,10 +202,8 @@ void SynchronousCompositorFrameSink::DetachFromClient() { |
client_->SetTreeActivationCallback(base::Closure()); |
if (!delegated_surface_id_.is_null()) |
surface_factory_->Destroy(delegated_surface_id_); |
- surface_manager_->UnregisterSurfaceFactoryClient( |
- surface_id_allocator_->frame_sink_id()); |
- surface_manager_->InvalidateFrameSinkId( |
- surface_id_allocator_->frame_sink_id()); |
+ surface_manager_->UnregisterSurfaceFactoryClient(kFrameSinkId); |
+ surface_manager_->InvalidateFrameSinkId(kFrameSinkId); |
software_compositor_frame_sink_ = nullptr; |
display_ = nullptr; |
surface_factory_ = nullptr; |