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

Unified Diff: cc/surfaces/display_unittest.cc

Issue 2304483002: Revert of Make cc::Display not own its BeginFrameSource (Closed)
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/surface_display_output_surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display_unittest.cc
diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc
index 3a813aea18ed6fb7c2f78ef5a915fd9bb44d7dfd..09cf73971ba82f68cc72f244e24a4454662a63ea 100644
--- a/cc/surfaces/display_unittest.cc
+++ b/cc/surfaces/display_unittest.cc
@@ -108,6 +108,9 @@
void SetUpDisplay(const RendererSettings& settings,
std::unique_ptr<TestWebGraphicsContext3D> context) {
+ std::unique_ptr<BeginFrameSource> begin_frame_source(
+ new StubBeginFrameSource);
+
std::unique_ptr<FakeOutputSurface> output_surface;
if (context) {
output_surface = FakeOutputSurface::Create3d(std::move(context));
@@ -120,12 +123,12 @@
output_surface_ = output_surface.get();
std::unique_ptr<TestDisplayScheduler> scheduler(
- new TestDisplayScheduler(&begin_frame_source_, task_runner_.get()));
+ new TestDisplayScheduler(begin_frame_source.get(), task_runner_.get()));
scheduler_ = scheduler.get();
display_ = base::MakeUnique<Display>(
&shared_bitmap_manager_, nullptr /* gpu_memory_buffer_manager */,
- settings, &begin_frame_source_, std::move(output_surface),
+ settings, std::move(begin_frame_source), std::move(output_surface),
std::move(scheduler),
base::MakeUnique<TextureMailboxDeleter>(task_runner_.get()));
display_->SetVisible(true);
@@ -150,7 +153,6 @@
FakeSurfaceFactoryClient surface_factory_client_;
SurfaceFactory factory_;
SurfaceIdAllocator id_allocator_;
- StubBeginFrameSource begin_frame_source_;
scoped_refptr<base::NullTaskRunner> task_runner_;
TestSharedBitmapManager shared_bitmap_manager_;
std::unique_ptr<Display> display_;
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/surface_display_output_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698