| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 TestSharedBitmapManager shared_bitmap_manager_; | 157 TestSharedBitmapManager shared_bitmap_manager_; |
| 158 std::unique_ptr<Display> display_; | 158 std::unique_ptr<Display> display_; |
| 159 TestSoftwareOutputDevice* software_output_device_ = nullptr; | 159 TestSoftwareOutputDevice* software_output_device_ = nullptr; |
| 160 FakeOutputSurface* output_surface_ = nullptr; | 160 FakeOutputSurface* output_surface_ = nullptr; |
| 161 TestDisplayScheduler* scheduler_ = nullptr; | 161 TestDisplayScheduler* scheduler_ = nullptr; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 class StubDisplayClient : public DisplayClient { | 164 class StubDisplayClient : public DisplayClient { |
| 165 public: | 165 public: |
| 166 void DisplayOutputSurfaceLost() override {} | 166 void DisplayOutputSurfaceLost() override {} |
| 167 void DisplaySetMemoryPolicy(const ManagedMemoryPolicy& policy) override {} | |
| 168 void DisplayWillDrawAndSwap(bool will_draw_and_swap, | 167 void DisplayWillDrawAndSwap(bool will_draw_and_swap, |
| 169 const RenderPassList& render_passes) override {} | 168 const RenderPassList& render_passes) override {} |
| 170 void DisplayDidDrawAndSwap() override {} | 169 void DisplayDidDrawAndSwap() override {} |
| 171 }; | 170 }; |
| 172 | 171 |
| 173 void CopyCallback(bool* called, std::unique_ptr<CopyOutputResult> result) { | 172 void CopyCallback(bool* called, std::unique_ptr<CopyOutputResult> result) { |
| 174 *called = true; | 173 *called = true; |
| 175 } | 174 } |
| 176 | 175 |
| 177 // Check that frame is damaged and swapped only under correct conditions. | 176 // Check that frame is damaged and swapped only under correct conditions. |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 | 494 |
| 496 EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM()); | 495 EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM()); |
| 497 display_->Resize(gfx::Size(250, 250)); | 496 display_->Resize(gfx::Size(250, 250)); |
| 498 testing::Mock::VerifyAndClearExpectations(context_ptr); | 497 testing::Mock::VerifyAndClearExpectations(context_ptr); |
| 499 | 498 |
| 500 factory_.Destroy(surface_id); | 499 factory_.Destroy(surface_id); |
| 501 } | 500 } |
| 502 | 501 |
| 503 } // namespace | 502 } // namespace |
| 504 } // namespace cc | 503 } // namespace cc |
| OLD | NEW |