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

Side by Side Diff: cc/trees/proxy_impl.cc

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add big fat TODOs in scheduler code to implement proper idle task scheduling and ensure GC is runni… Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/proxy_impl.h" 5 #include "cc/trees/proxy_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 external_begin_frame_source_ = nullptr; 116 external_begin_frame_source_ = nullptr;
117 unthrottled_begin_frame_source_ = nullptr; 117 unthrottled_begin_frame_source_ = nullptr;
118 synthetic_begin_frame_source_ = nullptr; 118 synthetic_begin_frame_source_ = nullptr;
119 layer_tree_host_impl_ = nullptr; 119 layer_tree_host_impl_ = nullptr;
120 // We need to explicitly shutdown the notifier to destroy any weakptrs it is 120 // We need to explicitly shutdown the notifier to destroy any weakptrs it is
121 // holding while still on the compositor thread. This also ensures any 121 // holding while still on the compositor thread. This also ensures any
122 // callbacks holding a ProxyImpl pointer are cancelled. 122 // callbacks holding a ProxyImpl pointer are cancelled.
123 smoothness_priority_expiration_notifier_.Shutdown(); 123 smoothness_priority_expiration_notifier_.Shutdown();
124 } 124 }
125 125
126 void ProxyImpl::InitializeMutatorOnImpl(
127 std::unique_ptr<LayerTreeMutator> mutator) {
128 TRACE_EVENT0("cc,compositor-worker", "ProxyImpl::InitializeMutatorOnImpl");
129 DCHECK(IsImplThread());
130 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator));
131 }
132
126 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, 133 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints,
127 TopControlsState current, 134 TopControlsState current,
128 bool animate) { 135 bool animate) {
129 DCHECK(IsImplThread()); 136 DCHECK(IsImplThread());
130 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( 137 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState(
131 constraints, current, animate); 138 constraints, current, animate);
132 } 139 }
133 140
134 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { 141 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) {
135 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); 142 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread");
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 bool ProxyImpl::IsMainThreadBlocked() const { 669 bool ProxyImpl::IsMainThreadBlocked() const {
663 return task_runner_provider_->IsMainThreadBlocked(); 670 return task_runner_provider_->IsMainThreadBlocked();
664 } 671 }
665 672
666 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 673 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
667 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 674 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
668 return main_thread_blocked_commit_vars_unsafe_; 675 return main_thread_blocked_commit_vars_unsafe_;
669 } 676 }
670 677
671 } // namespace cc 678 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698