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

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: Remove unnecessary scope Created 4 years, 8 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(LayerTreeMutator* mutator) {
127 TRACE_EVENT0("cc,compositor-worker", "ProxyImpl::InitializeMutatorOnImpl");
128 DCHECK(IsImplThread());
129 layer_tree_host_impl_->SetLayerTreeMutator(mutator);
130 }
131
126 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, 132 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints,
127 TopControlsState current, 133 TopControlsState current,
128 bool animate) { 134 bool animate) {
129 DCHECK(IsImplThread()); 135 DCHECK(IsImplThread());
130 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( 136 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState(
131 constraints, current, animate); 137 constraints, current, animate);
132 } 138 }
133 139
134 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { 140 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) {
135 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); 141 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread");
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 bool ProxyImpl::IsMainThreadBlocked() const { 696 bool ProxyImpl::IsMainThreadBlocked() const {
691 return task_runner_provider_->IsMainThreadBlocked(); 697 return task_runner_provider_->IsMainThreadBlocked();
692 } 698 }
693 699
694 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 700 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
695 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 701 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
696 return main_thread_blocked_commit_vars_unsafe_; 702 return main_thread_blocked_commit_vars_unsafe_;
697 } 703 }
698 704
699 } // namespace cc 705 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698