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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 17587014: cc: Fix infinite BeginFrame that Scheduler causes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch to land Created 7 years, 6 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_settings.cc ('k') | cc/trees/thread_proxy.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 6446e8dcbb7a9b181676c62e84605a85ee1d2630..e7f6799f5bbe5a15d3050105ed85c2316fd1a310 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -364,12 +364,13 @@ bool SchedulerStateMachine::BeginFrameNeededToDrawByImplThread() const {
}
bool SchedulerStateMachine::ProactiveBeginFrameWantedByImplThread() const {
- // We should proactively request a BeginFrame if a commit is pending.
- if (needs_commit_ || needs_forced_commit_ ||
- commit_state_ != COMMIT_STATE_IDLE)
- return true;
+ // Do not be proactive when invisible.
+ if (!visible_ || output_surface_state_ != OUTPUT_SURFACE_ACTIVE)
+ return false;
- return false;
+ // We should proactively request a BeginFrame if a commit is pending.
+ return (needs_commit_ || needs_forced_commit_ ||
+ commit_state_ != COMMIT_STATE_IDLE);
}
void SchedulerStateMachine::DidEnterBeginFrame(const BeginFrameArgs& args) {
« no previous file with comments | « cc/scheduler/scheduler_settings.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698