Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: cc/surfaces/display_unittest.cc

Issue 2208693003: Revert of cc: Make LayerTreeTests use a DelegatingRenderer and Display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/surfaces/display_client.h ('k') | cc/surfaces/surface_display_output_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
157 std::unique_ptr<Display> display_; 157 std::unique_ptr<Display> display_;
158 TestSoftwareOutputDevice* software_output_device_ = nullptr; 158 TestSoftwareOutputDevice* software_output_device_ = nullptr;
159 FakeOutputSurface* output_surface_ = nullptr; 159 FakeOutputSurface* output_surface_ = nullptr;
160 TestDisplayScheduler* scheduler_ = nullptr; 160 TestDisplayScheduler* scheduler_ = nullptr;
161 }; 161 };
162 162
163 class StubDisplayClient : public DisplayClient { 163 class StubDisplayClient : public DisplayClient {
164 public: 164 public:
165 void DisplayOutputSurfaceLost() override {} 165 void DisplayOutputSurfaceLost() override {}
166 void DisplaySetMemoryPolicy(const ManagedMemoryPolicy& policy) override {} 166 void DisplaySetMemoryPolicy(const ManagedMemoryPolicy& policy) override {}
167 void DisplayWillDrawAndSwap(bool will_draw_and_swap,
168 const RenderPassList& render_passes) override {}
169 void DisplayDidDrawAndSwap() override {}
170 }; 167 };
171 168
172 void CopyCallback(bool* called, std::unique_ptr<CopyOutputResult> result) { 169 void CopyCallback(bool* called, std::unique_ptr<CopyOutputResult> result) {
173 *called = true; 170 *called = true;
174 } 171 }
175 172
176 // Check that frame is damaged and swapped only under correct conditions. 173 // Check that frame is damaged and swapped only under correct conditions.
177 TEST_F(DisplayTest, DisplayDamaged) { 174 TEST_F(DisplayTest, DisplayDamaged) {
178 RendererSettings settings; 175 RendererSettings settings;
179 settings.partial_swap_enabled = true; 176 settings.partial_swap_enabled = true;
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 491
495 EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM()); 492 EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM());
496 display_->Resize(gfx::Size(250, 250)); 493 display_->Resize(gfx::Size(250, 250));
497 testing::Mock::VerifyAndClearExpectations(context_ptr); 494 testing::Mock::VerifyAndClearExpectations(context_ptr);
498 495
499 factory_.Destroy(surface_id); 496 factory_.Destroy(surface_id);
500 } 497 }
501 498
502 } // namespace 499 } // namespace
503 } // namespace cc 500 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display_client.h ('k') | cc/surfaces/surface_display_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698