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

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: Fix more tests 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/trees/proxy_impl.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('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 cf9206c939011ef6b4965eb93e2b2745ee3abb70..eed9dd450983bcd93f787e06cf51507ce82f0948 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -74,28 +74,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.
danakj 2016/08/16 00:30:04 nit: Make
+ 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_.get());
danakj 2016/08/16 00:30:04 nit: no .get()
+ DCHECK(
+ !layer_tree_host_->settings().use_output_surface_begin_frame_source ||
+ !external_begin_frame_source_.get());
danakj 2016/08/16 00:30:04 nit: no .get()
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);
« no previous file with comments | « cc/trees/proxy_impl.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698