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

Unified Diff: cc/scheduler_state_machine.cc

Issue 11348083: Revert 168095 - Merge 167537 - Use message passing for BeginFrameAndCommitState and clean up forced… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 8 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_state_machine.h ('k') | cc/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_state_machine.cc
===================================================================
--- cc/scheduler_state_machine.cc (revision 168100)
+++ cc/scheduler_state_machine.cc (working copy)
@@ -23,7 +23,6 @@
, m_needsForcedRedrawAfterNextCommit(false)
, m_needsCommit(false)
, m_needsForcedCommit(false)
- , m_expectImmediateBeginFrame(false)
, m_mainThreadNeedsLayerTextures(false)
, m_insideVSync(false)
, m_visible(false)
@@ -48,7 +47,6 @@
base::StringAppendF(&str, "m_needsForcedRedrawAfterNextCommit = %d; ", m_needsForcedRedrawAfterNextCommit);
base::StringAppendF(&str, "m_needsCommit = %d; ", m_needsCommit);
base::StringAppendF(&str, "m_needsForcedCommit = %d; ", m_needsForcedCommit);
- base::StringAppendF(&str, "m_expectImmediateBeginFrame = %d; ", m_expectImmediateBeginFrame);
base::StringAppendF(&str, "m_mainThreadNeedsLayerTextures = %d; ", m_mainThreadNeedsLayerTextures);
base::StringAppendF(&str, "m_insideVSync = %d; ", m_insideVSync);
base::StringAppendF(&str, "m_visible = %d; ", m_visible);
@@ -193,13 +191,8 @@
m_drawIfPossibleFailed = false;
if (m_insideVSync)
m_lastFrameNumberWhereDrawWasCalled = m_currentFrameNumber;
- if (m_commitState == COMMIT_STATE_WAITING_FOR_FIRST_DRAW) {
- if (m_expectImmediateBeginFrame) {
- m_commitState = COMMIT_STATE_FRAME_IN_PROGRESS;
- m_expectImmediateBeginFrame = false;
- } else
- m_commitState = COMMIT_STATE_IDLE;
- }
+ if (m_commitState == COMMIT_STATE_WAITING_FOR_FIRST_DRAW)
+ m_commitState = COMMIT_STATE_IDLE;
if (m_textureState == LAYER_TEXTURE_STATE_ACQUIRED_BY_IMPL_THREAD)
m_textureState = LAYER_TEXTURE_STATE_UNLOCKED;
return;
@@ -289,25 +282,19 @@
void SchedulerStateMachine::setNeedsForcedCommit()
{
m_needsForcedCommit = true;
- m_expectImmediateBeginFrame = true;
}
void SchedulerStateMachine::beginFrameComplete()
{
- DCHECK(m_commitState == COMMIT_STATE_FRAME_IN_PROGRESS ||
- (m_expectImmediateBeginFrame && m_commitState != COMMIT_STATE_IDLE)) << toString();
+ DCHECK(m_commitState == COMMIT_STATE_FRAME_IN_PROGRESS);
m_commitState = COMMIT_STATE_READY_TO_COMMIT;
}
void SchedulerStateMachine::beginFrameAborted()
{
DCHECK(m_commitState == COMMIT_STATE_FRAME_IN_PROGRESS);
- if (m_expectImmediateBeginFrame)
- m_expectImmediateBeginFrame = false;
- else {
- m_commitState = COMMIT_STATE_IDLE;
- setNeedsCommit();
- }
+ m_commitState = COMMIT_STATE_IDLE;
+ setNeedsCommit();
}
void SchedulerStateMachine::didLoseContext()
« no previous file with comments | « cc/scheduler_state_machine.h ('k') | cc/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698