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

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: Another attempt at rebasing. Created 5 years, 9 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 cc1a56499a4a8c0f7eb7d61ea107e17ed19d2b69..147a5a22830bce3a7d96a6956698881a39a15ec4 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -740,20 +740,16 @@ void SchedulerStateMachine::SetDeferCommits(bool defer_commits) {
// These are the cases where we definitely (or almost definitely) have a
// new frame to animate and/or draw and can draw.
bool SchedulerStateMachine::BeginFrameNeededToAnimateOrDraw() const {
+ // If we are not visible, we don't need BeginFrame messages.
+ if (!visible_)
+ return false;
sunnyps 2015/04/07 22:55:04 Better move this to the BeginFrameNeeded method no
brianderson 2015/04/08 01:21:59 +1 to moving the visibility checks to BeginFrameNe
mithro-old 2015/04/08 23:40:50 Done.
+
// The forced draw respects our normal draw scheduling, so we need to
// request a BeginImplFrame for it.
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_;
+ return needs_animate_ || needs_redraw_;
}
// These are cases where we are very likely to draw soon, but might not
« 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