Chromium Code Reviews| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 | 93 |
| 94 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {} | 94 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {} |
| 95 | 95 |
| 96 ProxyImpl::~ProxyImpl() { | 96 ProxyImpl::~ProxyImpl() { |
| 97 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl"); | 97 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl"); |
| 98 DCHECK(IsImplThread()); | 98 DCHECK(IsImplThread()); |
| 99 DCHECK(IsMainThreadBlocked()); | 99 DCHECK(IsMainThreadBlocked()); |
| 100 | 100 |
| 101 // Take away the CompositorFrameSink before destroying things so it doesn't | 101 // Take away the CompositorFrameSink before destroying things so it doesn't |
| 102 // try to call into its client mid-shutdown. | 102 // try to call into its client mid-shutdown. |
| 103 scheduler_->DidLoseCompositorFrameSink(); | |
| 104 layer_tree_host_impl_->ReleaseCompositorFrameSink(); | 103 layer_tree_host_impl_->ReleaseCompositorFrameSink(); |
|
enne (OOO)
2016/09/21 17:38:55
It's a little odd that single thread proxy now cal
sunnyps
2016/09/24 01:15:01
This is LTHI::ReleaseCFS not Scheduler::DidLoseCFS
| |
| 105 | |
| 106 scheduler_ = nullptr; | 104 scheduler_ = nullptr; |
| 107 external_begin_frame_source_ = nullptr; | 105 external_begin_frame_source_ = nullptr; |
| 108 layer_tree_host_impl_ = nullptr; | 106 layer_tree_host_impl_ = nullptr; |
| 109 // We need to explicitly shutdown the notifier to destroy any weakptrs it is | 107 // We need to explicitly shutdown the notifier to destroy any weakptrs it is |
| 110 // holding while still on the compositor thread. This also ensures any | 108 // holding while still on the compositor thread. This also ensures any |
| 111 // callbacks holding a ProxyImpl pointer are cancelled. | 109 // callbacks holding a ProxyImpl pointer are cancelled. |
| 112 smoothness_priority_expiration_notifier_.Shutdown(); | 110 smoothness_priority_expiration_notifier_.Shutdown(); |
| 113 } | 111 } |
| 114 | 112 |
| 115 void ProxyImpl::InitializeMutatorOnImpl( | 113 void ProxyImpl::InitializeMutatorOnImpl( |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 612 bool ProxyImpl::IsMainThreadBlocked() const { | 610 bool ProxyImpl::IsMainThreadBlocked() const { |
| 613 return task_runner_provider_->IsMainThreadBlocked(); | 611 return task_runner_provider_->IsMainThreadBlocked(); |
| 614 } | 612 } |
| 615 | 613 |
| 616 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 614 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 617 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 615 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 618 return main_thread_blocked_commit_vars_unsafe_; | 616 return main_thread_blocked_commit_vars_unsafe_; |
| 619 } | 617 } |
| 620 | 618 |
| 621 } // namespace cc | 619 } // namespace cc |
| OLD | NEW |