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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 870183004: Revert of cc: Control defer_commits logic by Scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 21c9d604e5ec1aa613207fcf84706d4d8a9914ab..488bba48a445c84c966349def4a8340cfa25ac8d 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -45,6 +45,7 @@
next_frame_is_newly_committed_frame_(false),
inside_draw_(false),
defer_commits_(false),
+ commit_was_deferred_(false),
commit_requested_(false),
inside_synchronous_composite_(false),
output_surface_creation_requested_(false),
@@ -311,7 +312,10 @@
TRACE_EVENT_ASYNC_END0("cc", "SingleThreadProxy::SetDeferCommits", this);
defer_commits_ = defer_commits;
- scheduler_on_impl_thread_->SetDeferCommits(defer_commits);
+ if (!defer_commits_ && commit_was_deferred_) {
+ commit_was_deferred_ = false;
+ BeginMainFrame();
+ }
}
bool SingleThreadProxy::CommitRequested() const {
@@ -672,10 +676,9 @@
void SingleThreadProxy::BeginMainFrame() {
if (defer_commits_) {
- TRACE_EVENT_INSTANT0("cc", "EarlyOut_DeferCommit",
- TRACE_EVENT_SCOPE_THREAD);
- BeginMainFrameAbortedOnImplThread(
- CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT);
+ DCHECK(!commit_was_deferred_);
+ commit_was_deferred_ = true;
+ layer_tree_host_->DidDeferCommit();
return;
}
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698