OLD | NEW |
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 external_begin_frame_source_ = nullptr; | 117 external_begin_frame_source_ = nullptr; |
118 unthrottled_begin_frame_source_ = nullptr; | 118 unthrottled_begin_frame_source_ = nullptr; |
119 synthetic_begin_frame_source_ = nullptr; | 119 synthetic_begin_frame_source_ = nullptr; |
120 layer_tree_host_impl_ = nullptr; | 120 layer_tree_host_impl_ = nullptr; |
121 // We need to explicitly shutdown the notifier to destroy any weakptrs it is | 121 // We need to explicitly shutdown the notifier to destroy any weakptrs it is |
122 // holding while still on the compositor thread. This also ensures any | 122 // holding while still on the compositor thread. This also ensures any |
123 // callbacks holding a ProxyImpl pointer are cancelled. | 123 // callbacks holding a ProxyImpl pointer are cancelled. |
124 smoothness_priority_expiration_notifier_.Shutdown(); | 124 smoothness_priority_expiration_notifier_.Shutdown(); |
125 } | 125 } |
126 | 126 |
| 127 void ProxyImpl::InitializeMutatorOnImpl( |
| 128 std::unique_ptr<LayerTreeMutator> mutator) { |
| 129 TRACE_EVENT0("cc,compositor-worker", "ProxyImpl::InitializeMutatorOnImpl"); |
| 130 DCHECK(IsImplThread()); |
| 131 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator)); |
| 132 } |
| 133 |
127 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, | 134 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, |
128 TopControlsState current, | 135 TopControlsState current, |
129 bool animate) { | 136 bool animate) { |
130 DCHECK(IsImplThread()); | 137 DCHECK(IsImplThread()); |
131 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( | 138 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( |
132 constraints, current, animate); | 139 constraints, current, animate); |
133 } | 140 } |
134 | 141 |
135 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { | 142 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { |
136 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); | 143 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 bool ProxyImpl::IsMainThreadBlocked() const { | 685 bool ProxyImpl::IsMainThreadBlocked() const { |
679 return task_runner_provider_->IsMainThreadBlocked(); | 686 return task_runner_provider_->IsMainThreadBlocked(); |
680 } | 687 } |
681 | 688 |
682 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 689 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
683 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 690 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
684 return main_thread_blocked_commit_vars_unsafe_; | 691 return main_thread_blocked_commit_vars_unsafe_; |
685 } | 692 } |
686 | 693 |
687 } // namespace cc | 694 } // namespace cc |
OLD | NEW |