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

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

Issue 2321883002: cc: Remove SetMemoryPolicy from OutputSurface and Display. (Closed)
Patch Set: nits Created 4 years, 3 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 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
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
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