summaryrefslogtreecommitdiffstats
path: root/cc/scheduler/scheduler_state_machine.cc
diff options
context:
space:
mode:
authorsimonhong@chromium.org <simonhong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-28 10:32:46 +0000
committersimonhong@chromium.org <simonhong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-28 10:32:46 +0000
commit2f86dd838fadf3c922bb8615290dd72e8cdb2117 (patch)
treea09a8509bb16932eada0ef411a3df8e566735962 /cc/scheduler/scheduler_state_machine.cc
parent69b5fbd510c42bac5b7589e7a70ac554d6bba6c6 (diff)
downloadchromium_src-2f86dd838fadf3c922bb8615290dd72e8cdb2117.zip
chromium_src-2f86dd838fadf3c922bb8615290dd72e8cdb2117.tar.gz
chromium_src-2f86dd838fadf3c922bb8615290dd72e8cdb2117.tar.bz2
cc: setting a needs_commit_ to true is only needed for forced commit when there is no scheduled BeginMainFrame()
Setting a needs_commit_ to true is not needed when there is already scheduled BeginMainFrame() because scheduled BeginMainFrame() should be excuted after finishing current requested readback draw. R=brianderson@chromium.org BUG=347370 TEST=cc_unittests --gtest_filter=SchedulerStateMachineTest.DontMakeNewCommitAfterDrawingReplaceCommit Review URL: https://codereview.chromium.org/179553006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/scheduler/scheduler_state_machine.cc')
-rw-r--r--cc/scheduler/scheduler_state_machine.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 7c2b24b..1111ba3 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -1084,10 +1084,13 @@ void SchedulerStateMachine::SetNeedsForcedCommitForReadback() {
// BeginMainFrame behind the readback request. In that case, we can skip
// READBACK_STATE_NEEDS_BEGIN_MAIN_FRAME and go directly to
// READBACK_STATE_WAITING_FOR_COMMIT
- if (commit_state_ == COMMIT_STATE_FRAME_IN_PROGRESS)
+ if (commit_state_ == COMMIT_STATE_FRAME_IN_PROGRESS) {
readback_state_ = READBACK_STATE_WAITING_FOR_COMMIT;
- else
+ } else {
+ // Set needs_commit_ to true to trigger scheduling BeginMainFrame().
+ needs_commit_ = true;
readback_state_ = READBACK_STATE_NEEDS_BEGIN_MAIN_FRAME;
+ }
}
void SchedulerStateMachine::FinishCommit() {