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

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

Issue 2193293004: cc: Make LayerTreeTests use a DelegatingRenderer and Display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: display-layertreetest: withperftestsfix 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 {}
167 }; 170 };
168 171
169 void CopyCallback(bool* called, std::unique_ptr<CopyOutputResult> result) { 172 void CopyCallback(bool* called, std::unique_ptr<CopyOutputResult> result) {
170 *called = true; 173 *called = true;
171 } 174 }
172 175
173 // Check that frame is damaged and swapped only under correct conditions. 176 // Check that frame is damaged and swapped only under correct conditions.
174 TEST_F(DisplayTest, DisplayDamaged) { 177 TEST_F(DisplayTest, DisplayDamaged) {
175 RendererSettings settings; 178 RendererSettings settings;
176 settings.partial_swap_enabled = true; 179 settings.partial_swap_enabled = true;
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 494
492 EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM()); 495 EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM());
493 display_->Resize(gfx::Size(250, 250)); 496 display_->Resize(gfx::Size(250, 250));
494 testing::Mock::VerifyAndClearExpectations(context_ptr); 497 testing::Mock::VerifyAndClearExpectations(context_ptr);
495 498
496 factory_.Destroy(surface_id); 499 factory_.Destroy(surface_id);
497 } 500 }
498 501
499 } // namespace 502 } // namespace
500 } // namespace cc 503 } // 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