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

Unified Diff: cc/scheduler_state_machine.cc

Issue 11439026: Revert 171403 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 171405)
+++ cc/scheduler_state_machine.cc (working copy)
@@ -28,7 +28,7 @@
, m_canDraw(false)
, m_drawIfPossibleFailed(false)
, m_textureState(LAYER_TEXTURE_STATE_UNLOCKED)
- , m_outputSurfaceState(OUTPUT_SURFACE_ACTIVE)
+ , m_contextState(CONTEXT_ACTIVE)
{
}
@@ -53,7 +53,7 @@
base::StringAppendF(&str, "m_canDraw = %d; ", m_canDraw);
base::StringAppendF(&str, "m_drawIfPossibleFailed = %d; ", m_drawIfPossibleFailed);
base::StringAppendF(&str, "m_textureState = %d; ", m_textureState);
- base::StringAppendF(&str, "m_outputSurfaceState = %d; ", m_outputSurfaceState);
+ base::StringAppendF(&str, "m_contextState = %d; ", m_contextState);
return str;
}
@@ -93,7 +93,7 @@
return false;
if (hasDrawnThisFrame())
return false;
- if (m_outputSurfaceState != OUTPUT_SURFACE_ACTIVE)
+ if (m_contextState != CONTEXT_ACTIVE)
return false;
return true;
}
@@ -120,13 +120,13 @@
return ACTION_ACQUIRE_LAYER_TEXTURES_FOR_MAIN_THREAD;
switch (m_commitState) {
case COMMIT_STATE_IDLE:
- if (m_outputSurfaceState != OUTPUT_SURFACE_ACTIVE && m_needsForcedRedraw)
+ if (m_contextState != CONTEXT_ACTIVE && m_needsForcedRedraw)
return ACTION_DRAW_FORCED;
- if (m_outputSurfaceState != OUTPUT_SURFACE_ACTIVE && m_needsForcedCommit)
+ if (m_contextState != CONTEXT_ACTIVE && m_needsForcedCommit)
return ACTION_BEGIN_FRAME;
- if (m_outputSurfaceState == OUTPUT_SURFACE_LOST)
- return ACTION_BEGIN_OUTPUT_SURFACE_RECREATION;
- if (m_outputSurfaceState == OUTPUT_SURFACE_RECREATING)
+ if (m_contextState == CONTEXT_LOST)
+ return ACTION_BEGIN_CONTEXT_RECREATION;
+ if (m_contextState == CONTEXT_RECREATING)
return ACTION_NONE;
if (shouldDraw())
return m_needsForcedRedraw ? ACTION_DRAW_FORCED : ACTION_DRAW_IF_POSSIBLE;
@@ -143,7 +143,7 @@
return ACTION_COMMIT;
case COMMIT_STATE_WAITING_FOR_FIRST_DRAW:
- if (shouldDraw() || m_outputSurfaceState == OUTPUT_SURFACE_LOST)
+ if (shouldDraw() || m_contextState == CONTEXT_LOST)
return m_needsForcedRedraw ? ACTION_DRAW_FORCED : ACTION_DRAW_IF_POSSIBLE;
// COMMIT_STATE_WAITING_FOR_FIRST_DRAW wants to enforce a draw. If m_canDraw is false
// or textures are not available, proceed to the next step (similar as in COMMIT_STATE_IDLE).
@@ -201,10 +201,10 @@
m_textureState = LAYER_TEXTURE_STATE_UNLOCKED;
return;
- case ACTION_BEGIN_OUTPUT_SURFACE_RECREATION:
+ case ACTION_BEGIN_CONTEXT_RECREATION:
DCHECK(m_commitState == COMMIT_STATE_IDLE);
- DCHECK(m_outputSurfaceState == OUTPUT_SURFACE_LOST);
- m_outputSurfaceState = OUTPUT_SURFACE_RECREATING;
+ DCHECK(m_contextState == CONTEXT_LOST);
+ m_contextState = CONTEXT_RECREATING;
return;
case ACTION_ACQUIRE_LAYER_TEXTURES_FOR_MAIN_THREAD:
@@ -232,7 +232,7 @@
if (m_needsForcedRedraw)
return true;
- return m_needsRedraw && m_visible && m_outputSurfaceState == OUTPUT_SURFACE_ACTIVE;
+ return m_needsRedraw && m_visible && m_contextState == CONTEXT_ACTIVE;
}
void SchedulerStateMachine::didEnterVSync()
@@ -307,17 +307,17 @@
}
}
-void SchedulerStateMachine::didLoseOutputSurface()
+void SchedulerStateMachine::didLoseContext()
{
- if (m_outputSurfaceState == OUTPUT_SURFACE_LOST || m_outputSurfaceState == OUTPUT_SURFACE_RECREATING)
+ if (m_contextState == CONTEXT_LOST || m_contextState == CONTEXT_RECREATING)
return;
- m_outputSurfaceState = OUTPUT_SURFACE_LOST;
+ m_contextState = CONTEXT_LOST;
}
-void SchedulerStateMachine::didRecreateOutputSurface()
+void SchedulerStateMachine::didRecreateContext()
{
- DCHECK(m_outputSurfaceState == OUTPUT_SURFACE_RECREATING);
- m_outputSurfaceState = OUTPUT_SURFACE_ACTIVE;
+ DCHECK(m_contextState == CONTEXT_RECREATING);
+ m_contextState = CONTEXT_ACTIVE;
setNeedsCommit();
}
« 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