Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: cc/trees/proxy_impl.cc

Issue 1984453003: cc: Do not reset pending tree state incorrectly on aborted commits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/scheduler/scheduler_state_machine_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 SetNeedsCommitOnImplThread(); 177 SetNeedsCommitOnImplThread();
178 } 178 }
179 179
180 void ProxyImpl::BeginMainFrameAbortedOnImpl( 180 void ProxyImpl::BeginMainFrameAbortedOnImpl(
181 CommitEarlyOutReason reason, 181 CommitEarlyOutReason reason,
182 base::TimeTicks main_thread_start_time) { 182 base::TimeTicks main_thread_start_time) {
183 TRACE_EVENT1("cc", "ProxyImpl::BeginMainFrameAbortedOnImplThread", "reason", 183 TRACE_EVENT1("cc", "ProxyImpl::BeginMainFrameAbortedOnImplThread", "reason",
184 CommitEarlyOutReasonToString(reason)); 184 CommitEarlyOutReasonToString(reason));
185 DCHECK(IsImplThread()); 185 DCHECK(IsImplThread());
186 DCHECK(scheduler_->CommitPending()); 186 DCHECK(scheduler_->CommitPending());
187 DCHECK(!layer_tree_host_impl_->pending_tree());
188 187
189 if (CommitEarlyOutHandledCommit(reason)) { 188 if (CommitEarlyOutHandledCommit(reason)) {
190 SetInputThrottledUntilCommitOnImpl(false); 189 SetInputThrottledUntilCommitOnImpl(false);
191 } 190 }
192 layer_tree_host_impl_->BeginMainFrameAborted(reason); 191 layer_tree_host_impl_->BeginMainFrameAborted(reason);
193 scheduler_->NotifyBeginMainFrameStarted(main_thread_start_time); 192 scheduler_->NotifyBeginMainFrameStarted(main_thread_start_time);
194 scheduler_->BeginMainFrameAborted(reason); 193 scheduler_->BeginMainFrameAborted(reason);
195 } 194 }
196 195
197 void ProxyImpl::FinishAllRenderingOnImpl(CompletionEvent* completion) { 196 void ProxyImpl::FinishAllRenderingOnImpl(CompletionEvent* completion) {
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 bool ProxyImpl::IsMainThreadBlocked() const { 661 bool ProxyImpl::IsMainThreadBlocked() const {
663 return task_runner_provider_->IsMainThreadBlocked(); 662 return task_runner_provider_->IsMainThreadBlocked();
664 } 663 }
665 664
666 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 665 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
667 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 666 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
668 return main_thread_blocked_commit_vars_unsafe_; 667 return main_thread_blocked_commit_vars_unsafe_;
669 } 668 }
670 669
671 } // namespace cc 670 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698