Chromium Code Reviews| Index: content/renderer/render_thread_impl.cc |
| diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
| index 4170eb015a85be8cacdf8eb6db9dfa51d67abd81..bf0bef33cd9af441369853f99ca335ebff98f230 100644 |
| --- a/content/renderer/render_thread_impl.cc |
| +++ b/content/renderer/render_thread_impl.cc |
| @@ -1594,6 +1594,13 @@ blink::scheduler::RendererScheduler* RenderThreadImpl::GetRendererScheduler() { |
| std::unique_ptr<cc::BeginFrameSource> |
| RenderThreadImpl::CreateExternalBeginFrameSource(int routing_id) { |
| + // Blimp drives itself and doesn't need a real begin frame source. |
|
danakj
2016/09/09 21:20:47
Does blimp server actually make an output surface?
enne (OOO)
2016/09/09 22:06:09
Oh! I thought it did, but it looks like it doesn't
|
| + // Instead of handling nullptr everywhere, this just provides a noop. |
| + const base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
| + if (cmd->HasSwitch(switches::kUseRemoteCompositing)) { |
| + return base::MakeUnique<cc::StubBeginFrameSource>(); |
| + } |
| + |
| return base::MakeUnique<CompositorExternalBeginFrameSource>( |
| compositor_message_filter_.get(), sync_message_filter(), routing_id); |
| } |
| @@ -1834,7 +1841,9 @@ RenderThreadImpl::CreateCompositorOutputSurface( |
| if (vulkan_context_provider) { |
| DCHECK(!layout_test_mode()); |
| return base::MakeUnique<CompositorOutputSurface>( |
| - routing_id, output_surface_id, std::move(vulkan_context_provider), |
| + routing_id, output_surface_id, |
| + CreateExternalBeginFrameSource(routing_id), |
| + std::move(vulkan_context_provider), |
| std::move(frame_swap_message_queue)); |
| } |
| } |
| @@ -1857,7 +1866,8 @@ RenderThreadImpl::CreateCompositorOutputSurface( |
| if (use_software) { |
| DCHECK(!layout_test_mode()); |
| return base::MakeUnique<CompositorOutputSurface>( |
| - routing_id, output_surface_id, nullptr, nullptr, |
| + routing_id, output_surface_id, |
| + CreateExternalBeginFrameSource(routing_id), nullptr, nullptr, |
| std::move(frame_swap_message_queue)); |
| } |
| @@ -1910,14 +1920,16 @@ RenderThreadImpl::CreateCompositorOutputSurface( |
| if (sync_compositor_message_filter_) { |
| return base::MakeUnique<SynchronousCompositorOutputSurface>( |
| std::move(context_provider), std::move(worker_context_provider), |
| - routing_id, output_surface_id, sync_compositor_message_filter_.get(), |
| + routing_id, output_surface_id, |
| + CreateExternalBeginFrameSource(routing_id), |
| + sync_compositor_message_filter_.get(), |
| std::move(frame_swap_message_queue)); |
| } |
| #endif |
| - |
| - return base::MakeUnique<CompositorOutputSurface>( |
| - routing_id, output_surface_id, std::move(context_provider), |
| - std::move(worker_context_provider), std::move(frame_swap_message_queue)); |
| + return base::WrapUnique(new CompositorOutputSurface( |
| + routing_id, output_surface_id, CreateExternalBeginFrameSource(routing_id), |
| + std::move(context_provider), std::move(worker_context_provider), |
| + std::move(frame_swap_message_queue))); |
| } |
| std::unique_ptr<cc::SwapPromise> |