Chromium Code Reviews| Index: cc/test/test_compositor_frame_sink.cc |
| diff --git a/cc/test/test_compositor_frame_sink.cc b/cc/test/test_compositor_frame_sink.cc |
| index aeb18a6d7efae7ef471b2ed8d250d8a9f77d167e..53ecfee77a4839e90a68fb5f4c4875577525fba5 100644 |
| --- a/cc/test/test_compositor_frame_sink.cc |
| +++ b/cc/test/test_compositor_frame_sink.cc |
| @@ -25,8 +25,7 @@ TestCompositorFrameSink::TestCompositorFrameSink( |
| gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| const RendererSettings& renderer_settings, |
| scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| - bool synchronous_composite, |
| - bool force_disable_reclaim_resources) |
| + bool synchronous_composite) |
| : CompositorFrameSink(std::move(compositor_context_provider), |
| std::move(worker_context_provider), |
| gpu_memory_buffer_manager, |
| @@ -40,11 +39,6 @@ TestCompositorFrameSink::TestCompositorFrameSink( |
| surface_factory_( |
| new SurfaceFactory(frame_sink_id_, surface_manager_.get(), this)), |
| weak_ptr_factory_(this) { |
| - // Since this CompositorFrameSink 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; |
| // Always use sync tokens so that code paths in resource provider that deal |
| // with sync tokens are tested. |
| capabilities_.delegated_sync_points_required = true; |
| @@ -171,13 +165,6 @@ void TestCompositorFrameSink::DidDrawCallback() { |
| client_->DidReceiveCompositorFrameAck(); |
| } |
| -void TestCompositorFrameSink::ForceReclaimResources() { |
| - if (capabilities_.can_force_reclaim_resources && |
| - delegated_local_frame_id_.is_valid()) { |
| - surface_factory_->ClearSurface(); |
| - } |
| -} |
| - |
| void TestCompositorFrameSink::ReturnResources( |
| const ReturnedResourceArray& resources) { |
| client_->ReclaimResources(resources); |
| @@ -200,6 +187,10 @@ void TestCompositorFrameSink::DisplayWillDrawAndSwap( |
| void TestCompositorFrameSink::DisplayDidDrawAndSwap() { |
| test_client_->DisplayDidDrawAndSwap(); |
| + if (force_reclaim_resources_after_swap_ && |
| + delegated_local_frame_id_.is_valid()) { |
| + surface_factory_->ClearSurface(); |
|
danakj
2017/01/04 18:43:38
Oh I lied, this is now a test-only method. Hm. Wou
ericrk
2017/01/11 19:17:54
Removed this and added an extra dummy swap in the
|
| + } |
| } |
| } // namespace cc |