| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 SetNeedsRedrawRectOnImplThread(damage_rect); | 181 SetNeedsRedrawRectOnImplThread(damage_rect); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void ProxyImpl::SetNeedsCommitOnImpl() { | 184 void ProxyImpl::SetNeedsCommitOnImpl() { |
| 185 DCHECK(IsImplThread()); | 185 DCHECK(IsImplThread()); |
| 186 SetNeedsCommitOnImplThread(); | 186 SetNeedsCommitOnImplThread(); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void ProxyImpl::BeginMainFrameAbortedOnImpl( | 189 void ProxyImpl::BeginMainFrameAbortedOnImpl( |
| 190 CommitEarlyOutReason reason, | 190 CommitEarlyOutReason reason, |
| 191 base::TimeTicks main_thread_start_time) { | 191 base::TimeTicks main_thread_start_time, |
| 192 std::vector<std::unique_ptr<SwapPromise>> swap_promises) { |
| 192 TRACE_EVENT1("cc", "ProxyImpl::BeginMainFrameAbortedOnImplThread", "reason", | 193 TRACE_EVENT1("cc", "ProxyImpl::BeginMainFrameAbortedOnImplThread", "reason", |
| 193 CommitEarlyOutReasonToString(reason)); | 194 CommitEarlyOutReasonToString(reason)); |
| 194 DCHECK(IsImplThread()); | 195 DCHECK(IsImplThread()); |
| 195 DCHECK(scheduler_->CommitPending()); | 196 DCHECK(scheduler_->CommitPending()); |
| 196 | 197 |
| 197 if (CommitEarlyOutHandledCommit(reason)) { | 198 if (CommitEarlyOutHandledCommit(reason)) { |
| 198 SetInputThrottledUntilCommitOnImpl(false); | 199 SetInputThrottledUntilCommitOnImpl(false); |
| 199 } | 200 } |
| 200 layer_tree_host_impl_->BeginMainFrameAborted(reason); | 201 layer_tree_host_impl_->BeginMainFrameAborted(reason, |
| 202 std::move(swap_promises)); |
| 201 scheduler_->NotifyBeginMainFrameStarted(main_thread_start_time); | 203 scheduler_->NotifyBeginMainFrameStarted(main_thread_start_time); |
| 202 scheduler_->BeginMainFrameAborted(reason); | 204 scheduler_->BeginMainFrameAborted(reason); |
| 203 } | 205 } |
| 204 | 206 |
| 205 void ProxyImpl::FinishAllRenderingOnImpl(CompletionEvent* completion) { | 207 void ProxyImpl::FinishAllRenderingOnImpl(CompletionEvent* completion) { |
| 206 TRACE_EVENT0("cc", "ProxyImpl::FinishAllRenderingOnImplThread"); | 208 TRACE_EVENT0("cc", "ProxyImpl::FinishAllRenderingOnImplThread"); |
| 207 DCHECK(IsImplThread()); | 209 DCHECK(IsImplThread()); |
| 208 layer_tree_host_impl_->FinishAllRendering(); | 210 layer_tree_host_impl_->FinishAllRendering(); |
| 209 completion->Signal(); | 211 completion->Signal(); |
| 210 } | 212 } |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 bool ProxyImpl::IsMainThreadBlocked() const { | 666 bool ProxyImpl::IsMainThreadBlocked() const { |
| 665 return task_runner_provider_->IsMainThreadBlocked(); | 667 return task_runner_provider_->IsMainThreadBlocked(); |
| 666 } | 668 } |
| 667 | 669 |
| 668 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 670 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 669 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 671 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 670 return main_thread_blocked_commit_vars_unsafe_; | 672 return main_thread_blocked_commit_vars_unsafe_; |
| 671 } | 673 } |
| 672 | 674 |
| 673 } // namespace cc | 675 } // namespace cc |
| OLD | NEW |