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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {} | 111 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {} |
112 | 112 |
113 ProxyImpl::~ProxyImpl() { | 113 ProxyImpl::~ProxyImpl() { |
114 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl"); | 114 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl"); |
115 DCHECK(IsImplThread()); | 115 DCHECK(IsImplThread()); |
116 DCHECK(IsMainThreadBlocked()); | 116 DCHECK(IsMainThreadBlocked()); |
117 | 117 |
118 // Take away the OutputSurface before destroying things so it doesn't try | 118 // Take away the OutputSurface before destroying things so it doesn't try |
119 // to call into its client mid-shutdown. | 119 // to call into its client mid-shutdown. |
| 120 scheduler_->DidLoseOutputSurface(); |
120 layer_tree_host_impl_->ReleaseOutputSurface(); | 121 layer_tree_host_impl_->ReleaseOutputSurface(); |
121 | 122 |
122 scheduler_ = nullptr; | 123 scheduler_ = nullptr; |
123 external_begin_frame_source_ = nullptr; | 124 external_begin_frame_source_ = nullptr; |
124 unthrottled_begin_frame_source_ = nullptr; | 125 unthrottled_begin_frame_source_ = nullptr; |
125 synthetic_begin_frame_source_ = nullptr; | 126 synthetic_begin_frame_source_ = nullptr; |
126 layer_tree_host_impl_ = nullptr; | 127 layer_tree_host_impl_ = nullptr; |
127 // We need to explicitly shutdown the notifier to destroy any weakptrs it is | 128 // We need to explicitly shutdown the notifier to destroy any weakptrs it is |
128 // holding while still on the compositor thread. This also ensures any | 129 // holding while still on the compositor thread. This also ensures any |
129 // callbacks holding a ProxyImpl pointer are cancelled. | 130 // callbacks holding a ProxyImpl pointer are cancelled. |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 bool ProxyImpl::IsMainThreadBlocked() const { | 680 bool ProxyImpl::IsMainThreadBlocked() const { |
680 return task_runner_provider_->IsMainThreadBlocked(); | 681 return task_runner_provider_->IsMainThreadBlocked(); |
681 } | 682 } |
682 | 683 |
683 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 684 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
684 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 685 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
685 return main_thread_blocked_commit_vars_unsafe_; | 686 return main_thread_blocked_commit_vars_unsafe_; |
686 } | 687 } |
687 | 688 |
688 } // namespace cc | 689 } // namespace cc |
OLD | NEW |