| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 scheduler_ = nullptr; | 100 scheduler_ = nullptr; |
| 101 external_begin_frame_source_ = nullptr; | 101 external_begin_frame_source_ = nullptr; |
| 102 layer_tree_host_impl_ = nullptr; | 102 layer_tree_host_impl_ = nullptr; |
| 103 // We need to explicitly shutdown the notifier to destroy any weakptrs it is | 103 // We need to explicitly shutdown the notifier to destroy any weakptrs it is |
| 104 // holding while still on the compositor thread. This also ensures any | 104 // holding while still on the compositor thread. This also ensures any |
| 105 // callbacks holding a ProxyImpl pointer are cancelled. | 105 // callbacks holding a ProxyImpl pointer are cancelled. |
| 106 smoothness_priority_expiration_notifier_.Shutdown(); | 106 smoothness_priority_expiration_notifier_.Shutdown(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void ProxyImpl::SetThrottleFrameProductionOnImpl(bool throttle) { | |
| 110 TRACE_EVENT1("cc", "ProxyImpl::SetThrottleFrameProductionOnImplThread", | |
| 111 "throttle", throttle); | |
| 112 DCHECK(IsImplThread()); | |
| 113 scheduler_->SetThrottleFrameProduction(throttle); | |
| 114 } | |
| 115 | |
| 116 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, | 109 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, |
| 117 TopControlsState current, | 110 TopControlsState current, |
| 118 bool animate) { | 111 bool animate) { |
| 119 DCHECK(IsImplThread()); | 112 DCHECK(IsImplThread()); |
| 120 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( | 113 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( |
| 121 constraints, current, animate); | 114 constraints, current, animate); |
| 122 } | 115 } |
| 123 | 116 |
| 124 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { | 117 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { |
| 125 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); | 118 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 bool ProxyImpl::IsMainThreadBlocked() const { | 658 bool ProxyImpl::IsMainThreadBlocked() const { |
| 666 return task_runner_provider_->IsMainThreadBlocked(); | 659 return task_runner_provider_->IsMainThreadBlocked(); |
| 667 } | 660 } |
| 668 | 661 |
| 669 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 662 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 670 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 663 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 671 return main_thread_blocked_commit_vars_unsafe_; | 664 return main_thread_blocked_commit_vars_unsafe_; |
| 672 } | 665 } |
| 673 | 666 |
| 674 } // namespace cc | 667 } // namespace cc |
| OLD | NEW |