| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/surfaces/display.h" | 5 #include "cc/surfaces/display.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/test/null_task_runner.h" | 9 #include "base/test/null_task_runner.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 std::unique_ptr<TestDisplayScheduler> scheduler( | 125 std::unique_ptr<TestDisplayScheduler> scheduler( |
| 126 new TestDisplayScheduler(begin_frame_source.get(), task_runner_.get())); | 126 new TestDisplayScheduler(begin_frame_source.get(), task_runner_.get())); |
| 127 scheduler_ = scheduler.get(); | 127 scheduler_ = scheduler.get(); |
| 128 | 128 |
| 129 display_ = base::MakeUnique<Display>( | 129 display_ = base::MakeUnique<Display>( |
| 130 &shared_bitmap_manager_, nullptr /* gpu_memory_buffer_manager */, | 130 &shared_bitmap_manager_, nullptr /* gpu_memory_buffer_manager */, |
| 131 settings, std::move(begin_frame_source), std::move(output_surface), | 131 settings, std::move(begin_frame_source), std::move(output_surface), |
| 132 std::move(scheduler), | 132 std::move(scheduler), |
| 133 base::MakeUnique<TextureMailboxDeleter>(task_runner_.get())); | 133 base::MakeUnique<TextureMailboxDeleter>(task_runner_.get())); |
| 134 display_->SetVisible(true); |
| 134 } | 135 } |
| 135 | 136 |
| 136 protected: | 137 protected: |
| 137 void SubmitCompositorFrame(RenderPassList* pass_list, | 138 void SubmitCompositorFrame(RenderPassList* pass_list, |
| 138 const SurfaceId& surface_id) { | 139 const SurfaceId& surface_id) { |
| 139 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); | 140 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); |
| 140 pass_list->swap(frame_data->render_pass_list); | 141 pass_list->swap(frame_data->render_pass_list); |
| 141 | 142 |
| 142 CompositorFrame frame; | 143 CompositorFrame frame; |
| 143 frame.delegated_frame_data = std::move(frame_data); | 144 frame.delegated_frame_data = std::move(frame_data); |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 | 495 |
| 495 EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM()); | 496 EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM()); |
| 496 display_->Resize(gfx::Size(250, 250)); | 497 display_->Resize(gfx::Size(250, 250)); |
| 497 testing::Mock::VerifyAndClearExpectations(context_ptr); | 498 testing::Mock::VerifyAndClearExpectations(context_ptr); |
| 498 | 499 |
| 499 factory_.Destroy(surface_id); | 500 factory_.Destroy(surface_id); |
| 500 } | 501 } |
| 501 | 502 |
| 502 } // namespace | 503 } // namespace |
| 503 } // namespace cc | 504 } // namespace cc |
| OLD | NEW |