| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 bool ProxyImpl::IsMainThreadBlocked() const { | 697 bool ProxyImpl::IsMainThreadBlocked() const { |
| 691 return task_runner_provider_->IsMainThreadBlocked(); | 698 return task_runner_provider_->IsMainThreadBlocked(); |
| 692 } | 699 } |
| 693 | 700 |
| 694 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 701 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 695 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 702 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 696 return main_thread_blocked_commit_vars_unsafe_; | 703 return main_thread_blocked_commit_vars_unsafe_; |
| 697 } | 704 } |
| 698 | 705 |
| 699 } // namespace cc | 706 } // namespace cc |
| OLD | NEW |