| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/test/pixel_test_delegating_output_surface.h" | 5 #include "cc/test/pixel_test_delegating_output_surface.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 std::move(display_context_provider_), nullptr, flipped_output_surface); | 81 std::move(display_context_provider_), nullptr, flipped_output_surface); |
| 82 } | 82 } |
| 83 output_surface->set_surface_expansion_size(surface_expansion_size_); | 83 output_surface->set_surface_expansion_size(surface_expansion_size_); |
| 84 | 84 |
| 85 auto* task_runner = base::ThreadTaskRunnerHandle::Get().get(); | 85 auto* task_runner = base::ThreadTaskRunnerHandle::Get().get(); |
| 86 CHECK(task_runner); | 86 CHECK(task_runner); |
| 87 | 87 |
| 88 std::unique_ptr<SyntheticBeginFrameSource> begin_frame_source; | 88 std::unique_ptr<SyntheticBeginFrameSource> begin_frame_source; |
| 89 std::unique_ptr<DisplayScheduler> scheduler; | 89 std::unique_ptr<DisplayScheduler> scheduler; |
| 90 if (!synchronous_composite_) { | 90 if (!synchronous_composite_) { |
| 91 begin_frame_source.reset(new DelayBasedBeginFrameSource( | 91 begin_frame_source.reset(new DelayBasedBeginFrameSource(task_runner)); |
| 92 base::MakeUnique<DelayBasedTimeSource>(task_runner))); | |
| 93 scheduler.reset(new DisplayScheduler( | 92 scheduler.reset(new DisplayScheduler( |
| 94 begin_frame_source.get(), task_runner, | 93 begin_frame_source.get(), task_runner, |
| 95 output_surface->capabilities().max_frames_pending)); | 94 output_surface->capabilities().max_frames_pending)); |
| 96 } | 95 } |
| 97 | 96 |
| 98 display_.reset(new Display( | 97 display_.reset(new Display( |
| 99 surface_manager_.get(), shared_bitmap_manager_, | 98 surface_manager_.get(), shared_bitmap_manager_, |
| 100 gpu_memory_buffer_manager_, renderer_settings_, | 99 gpu_memory_buffer_manager_, renderer_settings_, |
| 101 surface_id_allocator_->id_namespace(), std::move(begin_frame_source), | 100 surface_id_allocator_->id_namespace(), std::move(begin_frame_source), |
| 102 std::move(output_surface), std::move(scheduler), | 101 std::move(output_surface), std::move(scheduler), |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 ack.resources = resources; | 178 ack.resources = resources; |
| 180 client_->ReclaimResources(&ack); | 179 client_->ReclaimResources(&ack); |
| 181 } | 180 } |
| 182 | 181 |
| 183 void PixelTestDelegatingOutputSurface::SetBeginFrameSource( | 182 void PixelTestDelegatingOutputSurface::SetBeginFrameSource( |
| 184 BeginFrameSource* begin_frame_source) { | 183 BeginFrameSource* begin_frame_source) { |
| 185 client_->SetBeginFrameSource(begin_frame_source); | 184 client_->SetBeginFrameSource(begin_frame_source); |
| 186 } | 185 } |
| 187 | 186 |
| 188 } // namespace cc | 187 } // namespace cc |
| OLD | NEW |