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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 337693005: 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 c8eb6b0fad6b33dc9811cb2169a976d8b519ab8e..dc58d39a0911e9561feb942e27c0bd168e9a568d 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -45,7 +45,6 @@ SingleThreadProxy::SingleThreadProxy(
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),
@@ -313,10 +312,7 @@ void SingleThreadProxy::SetDeferCommits(bool defer_commits) {
TRACE_EVENT_ASYNC_END0("cc", "SingleThreadProxy::SetDeferCommits", this);
defer_commits_ = defer_commits;
- if (!defer_commits_ && commit_was_deferred_) {
- commit_was_deferred_ = false;
- BeginMainFrame();
- }
+ scheduler_on_impl_thread_->SetDeferCommits(defer_commits);
}
bool SingleThreadProxy::CommitRequested() const {
@@ -680,9 +676,10 @@ void SingleThreadProxy::ScheduledActionSendBeginMainFrame() {
void SingleThreadProxy::BeginMainFrame() {
if (defer_commits_) {
- DCHECK(!commit_was_deferred_);
- commit_was_deferred_ = true;
- layer_tree_host_->DidDeferCommit();
+ TRACE_EVENT_INSTANT0("cc", "EarlyOut_DeferCommit",
+ TRACE_EVENT_SCOPE_THREAD);
+ BeginMainFrameAbortedOnImplThread(
+ CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT);
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