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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 2083423006: Remove default begin frame sources from the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | content/renderer/gpu/compositor_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 81f09c5a9957acbf9fbc56a8b5ff8194a5da930f..1b28c6d7d8ec91baf0d9cf2a6949e0e05b36e0db 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -75,28 +75,22 @@ void SingleThreadProxy::Start(
CompositorTimingHistory::BROWSER_UMA,
layer_tree_host_->rendering_stats_instrumentation()));
- BeginFrameSource* frame_source = nullptr;
- if (!layer_tree_host_->settings().use_output_surface_begin_frame_source) {
- frame_source = external_begin_frame_source_.get();
- if (!scheduler_settings.throttle_frame_production) {
- // Unthrottled source takes precedence over external sources.
- unthrottled_begin_frame_source_.reset(new BackToBackBeginFrameSource(
- base::MakeUnique<DelayBasedTimeSource>(
- task_runner_provider_->MainThreadTaskRunner())));
- frame_source = unthrottled_begin_frame_source_.get();
- }
- if (!frame_source) {
- synthetic_begin_frame_source_.reset(new DelayBasedBeginFrameSource(
- base::MakeUnique<DelayBasedTimeSource>(
- task_runner_provider_->MainThreadTaskRunner())));
- frame_source = synthetic_begin_frame_source_.get();
- }
- }
-
+ // BFS must either be external or come from the output surface. If
+ // external, it must be provided. If from the output surface, it must
+ // not be provided.
+ // TODO(enne): Make all BFS come from the output surface.
+ DCHECK(layer_tree_host_->settings().use_external_begin_frame_source ^
+ layer_tree_host_->settings().use_output_surface_begin_frame_source);
+ DCHECK(!layer_tree_host_->settings().use_external_begin_frame_source ||
+ external_begin_frame_source_);
+ DCHECK(
+ !layer_tree_host_->settings().use_output_surface_begin_frame_source ||
+ !external_begin_frame_source_);
scheduler_on_impl_thread_ =
Scheduler::Create(this, scheduler_settings, layer_tree_host_->id(),
task_runner_provider_->MainThreadTaskRunner(),
- frame_source, std::move(compositor_timing_history));
+ external_begin_frame_source_.get(),
+ std::move(compositor_timing_history));
}
layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this);
@@ -462,12 +456,6 @@ void SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() {
output_surface_lost_ = true;
}
-void SingleThreadProxy::CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) {
- if (synthetic_begin_frame_source_)
- synthetic_begin_frame_source_->OnUpdateVSyncParameters(timebase, interval);
-}
-
void SingleThreadProxy::SetBeginFrameSource(BeginFrameSource* source) {
DCHECK(layer_tree_host_->settings().single_thread_proxy_scheduler);
// TODO(enne): this overrides any preexisting begin frame source. Those
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | content/renderer/gpu/compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698