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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 2317753002: cc: Abstract the LayerTreeHost. (Closed)
Patch Set: export for windows, keep the remote server test 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/remote_channel_main.cc ('k') | cc/trees/swap_promise_monitor.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 1b28c6d7d8ec91baf0d9cf2a6949e0e05b36e0db..a970c58cddd4a423122783481c40b468cdc2282d 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -63,10 +63,10 @@ void SingleThreadProxy::Start(
DebugScopedSetImplThread impl(task_runner_provider_);
external_begin_frame_source_ = std::move(external_begin_frame_source);
- if (layer_tree_host_->settings().single_thread_proxy_scheduler &&
+ if (layer_tree_host_->GetSettings().single_thread_proxy_scheduler &&
vmpstr 2016/09/07 18:26:11 Can you pull out settings into a const ref variabl
Khushal 2016/09/07 21:25:50 Done.
!scheduler_on_impl_thread_) {
SchedulerSettings scheduler_settings(
- layer_tree_host_->settings().ToSchedulerSettings());
+ layer_tree_host_->GetSettings().ToSchedulerSettings());
scheduler_settings.commit_to_active_tree = CommitToActiveTree();
std::unique_ptr<CompositorTimingHistory> compositor_timing_history(
@@ -79,15 +79,16 @@ void SingleThreadProxy::Start(
// 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_);
+ layer_tree_host_->GetSettings().use_external_begin_frame_source ^
+ layer_tree_host_->GetSettings().use_output_surface_begin_frame_source);
+ DCHECK(!layer_tree_host_->GetSettings().use_external_begin_frame_source ||
+ external_begin_frame_source_);
+ DCHECK(!layer_tree_host_->GetSettings()
+ .use_output_surface_begin_frame_source ||
+ !external_begin_frame_source_);
scheduler_on_impl_thread_ =
- Scheduler::Create(this, scheduler_settings, layer_tree_host_->id(),
+ Scheduler::Create(this, scheduler_settings, layer_tree_host_->GetId(),
task_runner_provider_->MainThreadTaskRunner(),
external_begin_frame_source_.get(),
std::move(compositor_timing_history));
@@ -194,7 +195,7 @@ void SingleThreadProxy::DoCommit() {
FROM_HERE_WITH_EXPLICIT_FUNCTION("461509 SingleThreadProxy::DoCommit1"));
layer_tree_host_->WillCommit();
devtools_instrumentation::ScopedCommitTrace commit_task(
- layer_tree_host_->id());
+ layer_tree_host_->GetId());
// Commit immediately.
{
@@ -457,10 +458,10 @@ void SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() {
}
void SingleThreadProxy::SetBeginFrameSource(BeginFrameSource* source) {
- DCHECK(layer_tree_host_->settings().single_thread_proxy_scheduler);
+ DCHECK(layer_tree_host_->GetSettings().single_thread_proxy_scheduler);
// TODO(enne): this overrides any preexisting begin frame source. Those
// other sources will eventually be removed and this will be the only path.
- if (!layer_tree_host_->settings().use_output_surface_begin_frame_source)
+ if (!layer_tree_host_->GetSettings().use_output_surface_begin_frame_source)
return;
if (scheduler_on_impl_thread_)
scheduler_on_impl_thread_->SetBeginFrameSource(source);
@@ -731,7 +732,7 @@ void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) {
// commit.
ScopedAbortRemainingSwapPromises swap_promise_checker(layer_tree_host_);
- if (!layer_tree_host_->visible()) {
+ if (!layer_tree_host_->IsVisible()) {
TRACE_EVENT_INSTANT0("cc", "EarlyOut_NotVisible", TRACE_EVENT_SCOPE_THREAD);
BeginMainFrameAbortedOnImplThread(
CommitEarlyOutReason::ABORTED_NOT_VISIBLE);
« no previous file with comments | « cc/trees/remote_channel_main.cc ('k') | cc/trees/swap_promise_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698