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

Unified Diff: cc/surfaces/display_unittest.cc

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BrowserCompositorOutputSurface owns;scheduler decides Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/display_unittest.cc
diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc
index cbc7e34e378d4d6cf74faf92fb87d72fabd91550..fe61e2241106d9eb10cf10ba9fd7b9845b6b9503 100644
--- a/cc/surfaces/display_unittest.cc
+++ b/cc/surfaces/display_unittest.cc
@@ -93,7 +93,6 @@ class DisplayTest : public testing::Test {
TestSoftwareOutputDevice* software_output_device_;
scoped_ptr<FakeOutputSurface> output_surface_;
FakeOutputSurface* output_surface_ptr_;
- FakeBeginFrameSource fake_begin_frame_source_;
scoped_refptr<base::NullTaskRunner> task_runner_;
scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
};
@@ -107,6 +106,12 @@ class TestDisplayClient : public DisplayClient {
base::TimeDelta interval) override {}
void OutputSurfaceLost() override {}
void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override {}
+ BeginFrameSource* BeginFrameSourceForChildren() override {
+ return &fake_begin_frame_source_;
+ }
+
+ private:
+ FakeBeginFrameSource fake_begin_frame_source_;
};
class TestDisplayScheduler : public DisplayScheduler {
@@ -163,7 +168,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
Display display(&client, &manager_, shared_bitmap_manager_.get(), nullptr,
settings);
- TestDisplayScheduler scheduler(&display, &fake_begin_frame_source_,
+ TestDisplayScheduler scheduler(&display, client.BeginFrameSourceForChildren(),
task_runner_.get());
display.Initialize(std::move(output_surface_), &scheduler);
@@ -429,7 +434,7 @@ TEST_F(DisplayTest, Finish) {
Display display(&client, &manager_, shared_bitmap_manager_.get(), nullptr,
settings);
- TestDisplayScheduler scheduler(&display, &fake_begin_frame_source_,
+ TestDisplayScheduler scheduler(&display, client.BeginFrameSourceForChildren(),
task_runner_.get());
display.Initialize(std::move(output_surface_), &scheduler);

Powered by Google App Engine
This is Rietveld 408576698