| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 smoothness_priority_expiration_notifier_.Shutdown(); | 103 smoothness_priority_expiration_notifier_.Shutdown(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void ProxyImpl::SetThrottleFrameProductionOnImpl(bool throttle) { | 106 void ProxyImpl::SetThrottleFrameProductionOnImpl(bool throttle) { |
| 107 TRACE_EVENT1("cc", "ProxyImpl::SetThrottleFrameProductionOnImplThread", | 107 TRACE_EVENT1("cc", "ProxyImpl::SetThrottleFrameProductionOnImplThread", |
| 108 "throttle", throttle); | 108 "throttle", throttle); |
| 109 DCHECK(IsImplThread()); | 109 DCHECK(IsImplThread()); |
| 110 scheduler_->SetThrottleFrameProduction(throttle); | 110 scheduler_->SetThrottleFrameProduction(throttle); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void ProxyImpl::InitializeMutatorOnImpl(LayerTreeMutator* mutator) { |
| 114 TRACE_EVENT0("cc,compositor-worker", "ProxyImpl::InitializeMutatorOnImpl"); |
| 115 DCHECK(IsImplThread()); |
| 116 layer_tree_host_impl_->SetLayerTreeMutator(mutator); |
| 117 } |
| 118 |
| 113 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, | 119 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, |
| 114 TopControlsState current, | 120 TopControlsState current, |
| 115 bool animate) { | 121 bool animate) { |
| 116 DCHECK(IsImplThread()); | 122 DCHECK(IsImplThread()); |
| 117 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( | 123 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( |
| 118 constraints, current, animate); | 124 constraints, current, animate); |
| 119 } | 125 } |
| 120 | 126 |
| 121 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { | 127 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { |
| 122 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); | 128 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 bool ProxyImpl::IsMainThreadBlocked() const { | 676 bool ProxyImpl::IsMainThreadBlocked() const { |
| 671 return task_runner_provider_->IsMainThreadBlocked(); | 677 return task_runner_provider_->IsMainThreadBlocked(); |
| 672 } | 678 } |
| 673 | 679 |
| 674 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 680 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 675 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 681 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 676 return main_thread_blocked_commit_vars_unsafe_; | 682 return main_thread_blocked_commit_vars_unsafe_; |
| 677 } | 683 } |
| 678 | 684 |
| 679 } // namespace cc | 685 } // namespace cc |
| OLD | NEW |