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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_settings.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 2b8210d2d2f85de8dbb86a381abff5f6f8266be0..94016f3d5eb297c62ec496543749905254c4eba9 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -423,9 +423,6 @@ bool SchedulerStateMachine::ShouldUpdateVisibleTiles() const {
}
bool SchedulerStateMachine::ShouldAnimate() const {
- if (!can_draw_)
- return false;
-
// If a commit occurred after our last call, we need to do animation again.
if (HasAnimatedThisFrame() && !did_commit_after_animating_)
return false;
@@ -765,29 +762,18 @@ bool SchedulerStateMachine::BeginFrameNeededToAnimateOrDraw() const {
if (!HasInitializedOutputSurface())
return false;
- // If we can't draw, don't tick until we are notified that we can draw again.
- if (!can_draw_)
- return false;
-
// 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;
- // There's no need to produce frames if we are not visible.
- if (!visible_)
- return false;
-
// We need to draw a more complete frame than we did the last BeginImplFrame,
// so request another BeginImplFrame in anticipation that we will have
// additional visible tiles.
if (swap_used_incomplete_tile_)
return true;
- if (needs_animate_)
- return true;
-
- 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_settings.cc ('k') | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698