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

Unified Diff: services/ui/surfaces/display_compositor.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 | « services/ui/surfaces/display_compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/surfaces/display_compositor.cc
diff --git a/services/ui/surfaces/display_compositor.cc b/services/ui/surfaces/display_compositor.cc
index 5252622057d4ebb130c8ff81baf929ee72b21bc8..3976ea285d2ca513364c20c8cf10ba659eefdd48 100644
--- a/services/ui/surfaces/display_compositor.cc
+++ b/services/ui/surfaces/display_compositor.cc
@@ -43,21 +43,22 @@
// TODO(rjkroege): If there is something better to do than CHECK, add it.
CHECK(surfaces_context_provider->BindToCurrentThread());
- synthetic_begin_frame_source_.reset(new cc::DelayBasedBeginFrameSource(
- base::MakeUnique<cc::DelayBasedTimeSource>(task_runner_.get())));
+ std::unique_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source(
+ new cc::DelayBasedBeginFrameSource(
+ base::MakeUnique<cc::DelayBasedTimeSource>(task_runner_.get())));
std::unique_ptr<cc::OutputSurface> display_output_surface;
if (surfaces_context_provider->ContextCapabilities().surfaceless) {
#if defined(USE_OZONE)
display_output_surface = base::MakeUnique<DirectOutputSurfaceOzone>(
- surfaces_context_provider, widget, synthetic_begin_frame_source_.get(),
+ surfaces_context_provider, widget, synthetic_begin_frame_source.get(),
gpu_memory_buffer_manager, GL_TEXTURE_2D, GL_RGB);
#else
NOTREACHED();
#endif
} else {
display_output_surface = base::MakeUnique<DirectOutputSurface>(
- surfaces_context_provider, synthetic_begin_frame_source_.get());
+ surfaces_context_provider, synthetic_begin_frame_source.get());
}
int max_frames_pending =
@@ -65,12 +66,12 @@
DCHECK_GT(max_frames_pending, 0);
std::unique_ptr<cc::DisplayScheduler> scheduler(
- new cc::DisplayScheduler(synthetic_begin_frame_source_.get(),
+ new cc::DisplayScheduler(synthetic_begin_frame_source.get(),
task_runner_.get(), max_frames_pending));
display_.reset(new cc::Display(
nullptr /* bitmap_manager */, gpu_memory_buffer_manager,
- cc::RendererSettings(), synthetic_begin_frame_source_.get(),
+ cc::RendererSettings(), std::move(synthetic_begin_frame_source),
std::move(display_output_surface), std::move(scheduler),
base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())));
display_->Initialize(this, surfaces_state_->manager(),
« no previous file with comments | « services/ui/surfaces/display_compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698