| Index: components/mus/surfaces/display_compositor.cc
|
| diff --git a/components/mus/surfaces/display_compositor.cc b/components/mus/surfaces/display_compositor.cc
|
| index 79e052305c3b3ea96e4c7d4e92bf80c7eda307b5..72ff9437c77d31246874e248dee0e709547aecbb 100644
|
| --- a/components/mus/surfaces/display_compositor.cc
|
| +++ b/components/mus/surfaces/display_compositor.cc
|
| @@ -26,7 +26,10 @@ DisplayCompositor::DisplayCompositor(
|
| : task_runner_(task_runner),
|
| surfaces_state_(surfaces_state),
|
| factory_(surfaces_state->manager(), this),
|
| - allocator_(surfaces_state->next_id_namespace()) {
|
| + allocator_(surfaces_state->next_id_namespace()),
|
| + synthetic_begin_frame_source_(new cc::SyntheticBeginFrameSource(
|
| + task_runner_.get(),
|
| + cc::BeginFrameArgs::DefaultInterval())) {
|
| allocator_.RegisterSurfaceIdNamespace(surfaces_state_->manager());
|
| surfaces_state_->manager()->RegisterSurfaceFactoryClient(
|
| allocator_.id_namespace(), this);
|
| @@ -40,25 +43,25 @@ DisplayCompositor::DisplayCompositor(
|
| if (surfaces_context_provider->ContextCapabilities().surfaceless) {
|
| #if defined(USE_OZONE)
|
| display_output_surface = base::WrapUnique(new DirectOutputSurfaceOzone(
|
| - surfaces_context_provider, widget, task_runner_.get(), GL_TEXTURE_2D,
|
| - GL_RGB));
|
| + surfaces_context_provider, widget, synthetic_begin_frame_source_.get(),
|
| + GL_TEXTURE_2D, GL_RGB));
|
| #else
|
| NOTREACHED();
|
| #endif
|
| } else {
|
| - display_output_surface = base::WrapUnique(
|
| - new DirectOutputSurface(surfaces_context_provider, task_runner_.get()));
|
| + display_output_surface = base::WrapUnique(new DirectOutputSurface(
|
| + surfaces_context_provider, synthetic_begin_frame_source_.get()));
|
| }
|
|
|
| int max_frames_pending =
|
| display_output_surface->capabilities().max_frames_pending;
|
| DCHECK_GT(max_frames_pending, 0);
|
|
|
| - display_.reset(
|
| - new cc::Display(surfaces_state_->manager(), nullptr /* bitmap_manager */,
|
| - nullptr /* gpu_memory_buffer_manager */,
|
| - cc::RendererSettings(), allocator_.id_namespace(),
|
| - task_runner_.get(), std::move(display_output_surface)));
|
| + display_.reset(new cc::Display(
|
| + surfaces_state_->manager(), nullptr /* bitmap_manager */,
|
| + nullptr /* gpu_memory_buffer_manager */, cc::RendererSettings(),
|
| + allocator_.id_namespace(), task_runner_.get(),
|
| + synthetic_begin_frame_source_.get(), std::move(display_output_surface)));
|
|
|
| bool init = display_->Initialize(this);
|
| DCHECK(init); // The context provider was already bound above.
|
|
|