| Index: cc/test/test_delegating_output_surface.cc
|
| diff --git a/cc/test/test_delegating_output_surface.cc b/cc/test/test_delegating_output_surface.cc
|
| index d626a3d9aa4f02aca5883408e3f907f8e57285b3..8f586cf18f7e7c11a374a95c0fa3ca12b59d85f5 100644
|
| --- a/cc/test/test_delegating_output_surface.cc
|
| +++ b/cc/test/test_delegating_output_surface.cc
|
| @@ -24,8 +24,7 @@
|
| gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
|
| const RendererSettings& renderer_settings,
|
| base::SingleThreadTaskRunner* task_runner,
|
| - bool synchronous_composite,
|
| - bool force_disable_reclaim_resources)
|
| + bool synchronous_composite)
|
| : OutputSurface(std::move(compositor_context_provider),
|
| std::move(worker_context_provider),
|
| nullptr),
|
| @@ -38,9 +37,6 @@
|
| if (!synchronous_composite) {
|
| begin_frame_source.reset(new DelayBasedBeginFrameSource(
|
| base::MakeUnique<DelayBasedTimeSource>(task_runner)));
|
| - begin_frame_source->SetAuthoritativeVSyncInterval(
|
| - base::TimeDelta::FromMilliseconds(1000.f /
|
| - renderer_settings.refresh_rate));
|
| scheduler.reset(new DisplayScheduler(
|
| begin_frame_source.get(), task_runner,
|
| display_output_surface->capabilities().max_frames_pending));
|
| @@ -56,9 +52,8 @@
|
| capabilities_.delegated_rendering = true;
|
| // Since this OutputSurface and the Display are tightly coupled and in the
|
| // same process/thread, the LayerTreeHostImpl can reclaim resources from
|
| - // the Display. But we allow tests to disable this to mimic an out-of-process
|
| - // Display.
|
| - capabilities_.can_force_reclaim_resources = !force_disable_reclaim_resources;
|
| + // the Display.
|
| + capabilities_.can_force_reclaim_resources = true;
|
| capabilities_.delegated_sync_points_required =
|
| !context_shared_with_compositor;
|
| }
|
| @@ -112,9 +107,6 @@
|
| }
|
|
|
| void TestDelegatingOutputSurface::SwapBuffers(CompositorFrame frame) {
|
| - if (test_client_)
|
| - test_client_->DisplayReceivedCompositorFrame(frame);
|
| -
|
| if (delegated_surface_id_.is_null()) {
|
| delegated_surface_id_ = surface_id_allocator_->GenerateId();
|
| surface_factory_->Create(delegated_surface_id_);
|
| @@ -130,7 +122,7 @@
|
|
|
| surface_factory_->SubmitCompositorFrame(
|
| delegated_surface_id_, std::move(frame),
|
| - base::Bind(&TestDelegatingOutputSurface::DidDrawCallback,
|
| + base::Bind(&TestDelegatingOutputSurface::DrawCallback,
|
| weak_ptrs_.GetWeakPtr(), synchronous));
|
|
|
| for (std::unique_ptr<CopyOutputRequest>& copy_request : copy_requests_)
|
| @@ -138,11 +130,11 @@
|
| std::move(copy_request));
|
| copy_requests_.clear();
|
|
|
| - if (synchronous)
|
| + if (!display_->has_scheduler())
|
| display_->DrawAndSwap();
|
| }
|
|
|
| -void TestDelegatingOutputSurface::DidDrawCallback(bool synchronous) {
|
| +void TestDelegatingOutputSurface::DrawCallback(bool synchronous) {
|
| // This is the frame ack to unthrottle the next frame, not actually a notice
|
| // that drawing is done.
|
| if (synchronous) {
|
| @@ -194,16 +186,4 @@
|
| SetMemoryPolicy(policy);
|
| }
|
|
|
| -void TestDelegatingOutputSurface::DisplayWillDrawAndSwap(
|
| - bool will_draw_and_swap,
|
| - const RenderPassList& render_passes) {
|
| - if (test_client_)
|
| - test_client_->DisplayWillDrawAndSwap(will_draw_and_swap, render_passes);
|
| -}
|
| -
|
| -void TestDelegatingOutputSurface::DisplayDidDrawAndSwap() {
|
| - if (test_client_)
|
| - test_client_->DisplayDidDrawAndSwap();
|
| -}
|
| -
|
| } // namespace cc
|
|
|