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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1050833002: cc: Remove background ticking from LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto master. Created 5 years, 8 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/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 89316544f29d18f83294925e40e3f0e56770e063..72e68ea3e74505df242a61f009c5ed97fcd70edb 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -729,6 +729,11 @@ bool SchedulerStateMachine::BeginFrameNeeded() const {
// TODO(brianderson): Support output surface creation inside a BeginFrame.
if (!HasInitializedOutputSurface())
return false;
+
+ // If we are not visible, we don't need BeginFrame messages.
+ if (!visible_)
+ return false;
+
return (BeginFrameRequiredForAction() || BeginFrameRequiredForChildren() ||
ProactiveBeginFrameWanted());
}
@@ -750,15 +755,7 @@ bool SchedulerStateMachine::BeginFrameRequiredForAction() const {
if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW)
return true;
- // TODO(mithro): Remove background animation ticking. crbug.com/371747
- if (needs_animate_)
- return true;
-
- // Only background tick for animations - not draws, which will never happen.
- if (!visible_)
- return false;
-
- return needs_redraw_ || (needs_commit_ && !defer_commits_);
+ return needs_animate_ || needs_redraw_ || (needs_commit_ && !defer_commits_);
}
// These are cases where we are very likely want a BeginFrame message in the
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698