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

Unified Diff: cc/scheduler_state_machine.cc

Issue 12022043: cc: Fix inappropriate use of term "texture". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/InitializeTile/UploadTile/ and s/CompletedSetPixels/CompletedTileUploads/ Created 7 years, 11 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_state_machine.h ('k') | cc/scheduler_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
diff --git a/cc/scheduler_state_machine.cc b/cc/scheduler_state_machine.cc
index 01f2f0098baee6b40e627047db0f7f76965190ce..cb92a920f58a5a02230aeff6d01216f3197ce214 100644
--- a/cc/scheduler_state_machine.cc
+++ b/cc/scheduler_state_machine.cc
@@ -15,11 +15,11 @@ SchedulerStateMachine::SchedulerStateMachine(const SchedulerSettings& settings)
, m_currentFrameNumber(0)
, m_lastFrameNumberWhereDrawWasCalled(-1)
, m_lastFrameNumberWhereTreeActivationAttempted(-1)
- , m_lastFrameNumberWhereCheckForCompletedTexturesCalled(-1)
+ , m_lastFrameNumberWhereCheckForCompletedTileUploadsCalled(-1)
, m_consecutiveFailedDraws(0)
, m_maximumNumberOfFailedDrawsBeforeDrawIsForced(3)
, m_needsRedraw(false)
- , m_swapUsedIncompleteTexture(false)
+ , m_swapUsedIncompleteTile(false)
, m_needsForcedRedraw(false)
, m_needsForcedRedrawAfterNextCommit(false)
, m_needsCommit(false)
@@ -45,11 +45,11 @@ std::string SchedulerStateMachine::toString()
base::StringAppendF(&str, "m_currentFrameNumber = %d; ", m_currentFrameNumber);
base::StringAppendF(&str, "m_lastFrameNumberWhereDrawWasCalled = %d; ", m_lastFrameNumberWhereDrawWasCalled);
base::StringAppendF(&str, "m_lastFrameNumberWhereTreeActivationAttempted = %d; ", m_lastFrameNumberWhereTreeActivationAttempted);
- base::StringAppendF(&str, "m_lastFrameNumberWhereCheckForCompletedTexturesCalled = %d; ", m_lastFrameNumberWhereCheckForCompletedTexturesCalled);
+ base::StringAppendF(&str, "m_lastFrameNumberWhereCheckForCompletedTileUploadsCalled = %d; ", m_lastFrameNumberWhereCheckForCompletedTileUploadsCalled);
base::StringAppendF(&str, "m_consecutiveFailedDraws = %d; ", m_consecutiveFailedDraws);
base::StringAppendF(&str, "m_maximumNumberOfFailedDrawsBeforeDrawIsForced = %d; ", m_maximumNumberOfFailedDrawsBeforeDrawIsForced);
base::StringAppendF(&str, "m_needsRedraw = %d; ", m_needsRedraw);
- base::StringAppendF(&str, "m_swapUsedIncompleteTexture = %d; ", m_swapUsedIncompleteTexture);
+ base::StringAppendF(&str, "m_swapUsedIncompleteTile = %d; ", m_swapUsedIncompleteTile);
base::StringAppendF(&str, "m_needsForcedRedraw = %d; ", m_needsForcedRedraw);
base::StringAppendF(&str, "m_needsForcedRedrawAfterNextCommit = %d; ", m_needsForcedRedrawAfterNextCommit);
base::StringAppendF(&str, "m_needsCommit = %d; ", m_needsCommit);
@@ -77,10 +77,10 @@ bool SchedulerStateMachine::hasAttemptedTreeActivationThisFrame() const
return m_currentFrameNumber == m_lastFrameNumberWhereTreeActivationAttempted;
}
-bool SchedulerStateMachine::hasCheckedForCompletedTexturesThisFrame() const
+bool SchedulerStateMachine::hasCheckedForCompletedTileUploadsThisFrame() const
{
return m_currentFrameNumber ==
- m_lastFrameNumberWhereCheckForCompletedTexturesCalled;
+ m_lastFrameNumberWhereCheckForCompletedTileUploadsCalled;
}
bool SchedulerStateMachine::drawSuspendedUntilCommit() const
@@ -124,16 +124,16 @@ bool SchedulerStateMachine::shouldAttemptTreeActivation() const
return m_hasPendingTree && m_insideVSync && !hasAttemptedTreeActivationThisFrame();
}
-bool SchedulerStateMachine::shouldCheckForCompletedTextures() const
+bool SchedulerStateMachine::shouldCheckForCompletedTileUploads() const
{
if (!m_settings.implSidePainting)
return false;
- if (hasCheckedForCompletedTexturesThisFrame())
+ if (hasCheckedForCompletedTileUploadsThisFrame())
return false;
return shouldAttemptTreeActivation() ||
shouldDraw() ||
- m_swapUsedIncompleteTexture;
+ m_swapUsedIncompleteTile;
}
bool SchedulerStateMachine::shouldAcquireLayerTexturesForMainThread() const
@@ -168,8 +168,8 @@ SchedulerStateMachine::Action SchedulerStateMachine::nextAction() const
return ACTION_BEGIN_OUTPUT_SURFACE_RECREATION;
if (m_outputSurfaceState == OUTPUT_SURFACE_RECREATING)
return ACTION_NONE;
- if (shouldCheckForCompletedTextures())
- return ACTION_CHECK_FOR_NEW_TEXTURES;
+ if (shouldCheckForCompletedTileUploads())
+ return ACTION_CHECK_FOR_COMPLETED_TILE_UPLOADS;
if (shouldAttemptTreeActivation())
return ACTION_ACTIVATE_PENDING_TREE_IF_NEEDED;
if (shouldDraw())
@@ -180,8 +180,8 @@ SchedulerStateMachine::Action SchedulerStateMachine::nextAction() const
return ACTION_NONE;
case COMMIT_STATE_FRAME_IN_PROGRESS:
- if (shouldCheckForCompletedTextures())
- return ACTION_CHECK_FOR_NEW_TEXTURES;
+ if (shouldCheckForCompletedTileUploads())
+ return ACTION_CHECK_FOR_COMPLETED_TILE_UPLOADS;
if (shouldAttemptTreeActivation())
return ACTION_ACTIVATE_PENDING_TREE_IF_NEEDED;
if (shouldDraw())
@@ -192,8 +192,8 @@ SchedulerStateMachine::Action SchedulerStateMachine::nextAction() const
return ACTION_COMMIT;
case COMMIT_STATE_WAITING_FOR_FIRST_DRAW: {
- if (shouldCheckForCompletedTextures())
- return ACTION_CHECK_FOR_NEW_TEXTURES;
+ if (shouldCheckForCompletedTileUploads())
+ return ACTION_CHECK_FOR_COMPLETED_TILE_UPLOADS;
if (shouldAttemptTreeActivation())
return ACTION_ACTIVATE_PENDING_TREE_IF_NEEDED;
if (shouldDraw() || m_outputSurfaceState == OUTPUT_SURFACE_LOST)
@@ -207,8 +207,8 @@ SchedulerStateMachine::Action SchedulerStateMachine::nextAction() const
}
case COMMIT_STATE_WAITING_FOR_FIRST_FORCED_DRAW:
- if (shouldCheckForCompletedTextures())
- return ACTION_CHECK_FOR_NEW_TEXTURES;
+ if (shouldCheckForCompletedTileUploads())
+ return ACTION_CHECK_FOR_COMPLETED_TILE_UPLOADS;
if (shouldAttemptTreeActivation())
return ACTION_ACTIVATE_PENDING_TREE_IF_NEEDED;
if (m_needsForcedRedraw)
@@ -225,8 +225,8 @@ void SchedulerStateMachine::updateState(Action action)
case ACTION_NONE:
return;
- case ACTION_CHECK_FOR_NEW_TEXTURES:
- m_lastFrameNumberWhereCheckForCompletedTexturesCalled = m_currentFrameNumber;
+ case ACTION_CHECK_FOR_COMPLETED_TILE_UPLOADS:
+ m_lastFrameNumberWhereCheckForCompletedTileUploadsCalled = m_currentFrameNumber;
return;
case ACTION_ACTIVATE_PENDING_TREE_IF_NEEDED:
@@ -313,7 +313,7 @@ bool SchedulerStateMachine::vsyncCallbackNeeded() const
if (m_needsForcedRedraw)
return true;
- if (m_visible && m_swapUsedIncompleteTexture)
+ if (m_visible && m_swapUsedIncompleteTile)
return true;
return m_needsRedraw && m_visible && m_outputSurfaceState == OUTPUT_SURFACE_ACTIVE;
@@ -340,9 +340,9 @@ void SchedulerStateMachine::setNeedsRedraw()
m_needsRedraw = true;
}
-void SchedulerStateMachine::didSwapUseIncompleteTexture()
+void SchedulerStateMachine::didSwapUseIncompleteTile()
{
- m_swapUsedIncompleteTexture = true;
+ m_swapUsedIncompleteTile = true;
}
void SchedulerStateMachine::setNeedsForcedRedraw()
« no previous file with comments | « cc/scheduler_state_machine.h ('k') | cc/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698