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

Unified Diff: cc/trees/proxy_impl.cc

Issue 2317753002: cc: Abstract the LayerTreeHost. (Closed)
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/property_tree_builder.cc ('k') | cc/trees/proxy_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy_impl.cc
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index 80adffbe0697a61a90e1932ea0fb8b0515dd947e..f6127ab29ea1395de715a0fd294b1f7815868b88 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -41,7 +41,7 @@ ProxyImpl::ProxyImpl(
LayerTreeHost* layer_tree_host,
TaskRunnerProvider* task_runner_provider,
std::unique_ptr<BeginFrameSource> external_begin_frame_source)
- : layer_tree_host_id_(layer_tree_host->id()),
+ : layer_tree_host_id_(layer_tree_host->GetId()),
commit_completion_waits_for_activation_(false),
commit_completion_event_(nullptr),
activation_completion_event_(nullptr),
@@ -67,9 +67,9 @@ ProxyImpl::ProxyImpl(
DCHECK(!smoothness_priority_expiration_notifier_.delay().is_zero());
layer_tree_host_impl_ = layer_tree_host->CreateLayerTreeHostImpl(this);
+ const LayerTreeSettings& settings = layer_tree_host->GetSettings();
- SchedulerSettings scheduler_settings(
- layer_tree_host->settings().ToSchedulerSettings());
+ SchedulerSettings scheduler_settings(settings.ToSchedulerSettings());
std::unique_ptr<CompositorTimingHistory> compositor_timing_history(
new CompositorTimingHistory(
@@ -81,11 +81,11 @@ ProxyImpl::ProxyImpl(
// 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 ||
+ DCHECK(settings.use_external_begin_frame_source ^
+ settings.use_output_surface_begin_frame_source);
+ DCHECK(!settings.use_external_begin_frame_source ||
external_begin_frame_source_);
- DCHECK(!layer_tree_host->settings().use_output_surface_begin_frame_source ||
+ DCHECK(!settings.use_output_surface_begin_frame_source ||
!external_begin_frame_source_);
scheduler_ = Scheduler::Create(this, scheduler_settings, layer_tree_host_id_,
task_runner_provider_->ImplThreadTaskRunner(),
« no previous file with comments | « cc/trees/property_tree_builder.cc ('k') | cc/trees/proxy_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698