| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CCSchedulerStateMachine_h | 5 #ifndef CCSchedulerStateMachine_h |
| 6 #define CCSchedulerStateMachine_h | 6 #define CCSchedulerStateMachine_h |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // Indicates whether ACTION_DRAW_IF_POSSIBLE drew to the screen or not. | 86 // Indicates whether ACTION_DRAW_IF_POSSIBLE drew to the screen or not. |
| 87 void didDrawIfPossibleCompleted(bool success); | 87 void didDrawIfPossibleCompleted(bool success); |
| 88 | 88 |
| 89 // Indicates that a new commit flow needs to be performed, either to pull | 89 // Indicates that a new commit flow needs to be performed, either to pull |
| 90 // updates from the main thread to the impl, or to push deltas from the impl | 90 // updates from the main thread to the impl, or to push deltas from the impl |
| 91 // thread to main. | 91 // thread to main. |
| 92 void setNeedsCommit(); | 92 void setNeedsCommit(); |
| 93 | 93 |
| 94 // As setNeedsCommit(), but ensures the beginFrame will definitely happen ev
en if | 94 // As setNeedsCommit(), but ensures the beginFrame will definitely happen ev
en if |
| 95 // we are not visible. | 95 // we are not visible. |
| 96 // After this call we expect to go through the forced commit flow and then r
eturn |
| 97 // to waiting for a non-forced beginFrame to finish. |
| 96 void setNeedsForcedCommit(); | 98 void setNeedsForcedCommit(); |
| 97 | 99 |
| 98 // Call this only in response to receiving an ACTION_BEGIN_FRAME | 100 // Call this only in response to receiving an ACTION_BEGIN_FRAME |
| 99 // from nextState. Indicates that all painting is complete. | 101 // from nextState. Indicates that all painting is complete. |
| 100 void beginFrameComplete(); | 102 void beginFrameComplete(); |
| 101 | 103 |
| 102 // Call this only in response to receiving an ACTION_BEGIN_FRAME | 104 // Call this only in response to receiving an ACTION_BEGIN_FRAME |
| 103 // from nextState if the client rejects the beginFrame message. | 105 // from nextState if the client rejects the beginFrame message. |
| 104 void beginFrameAborted(); | 106 void beginFrameAborted(); |
| 105 | 107 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 139 |
| 138 int m_currentFrameNumber; | 140 int m_currentFrameNumber; |
| 139 int m_lastFrameNumberWhereDrawWasCalled; | 141 int m_lastFrameNumberWhereDrawWasCalled; |
| 140 int m_consecutiveFailedDraws; | 142 int m_consecutiveFailedDraws; |
| 141 int m_maximumNumberOfFailedDrawsBeforeDrawIsForced; | 143 int m_maximumNumberOfFailedDrawsBeforeDrawIsForced; |
| 142 bool m_needsRedraw; | 144 bool m_needsRedraw; |
| 143 bool m_needsForcedRedraw; | 145 bool m_needsForcedRedraw; |
| 144 bool m_needsForcedRedrawAfterNextCommit; | 146 bool m_needsForcedRedrawAfterNextCommit; |
| 145 bool m_needsCommit; | 147 bool m_needsCommit; |
| 146 bool m_needsForcedCommit; | 148 bool m_needsForcedCommit; |
| 149 bool m_expectImmediateBeginFrame; |
| 147 bool m_mainThreadNeedsLayerTextures; | 150 bool m_mainThreadNeedsLayerTextures; |
| 148 bool m_insideVSync; | 151 bool m_insideVSync; |
| 149 bool m_visible; | 152 bool m_visible; |
| 150 bool m_canBeginFrame; | 153 bool m_canBeginFrame; |
| 151 bool m_canDraw; | 154 bool m_canDraw; |
| 152 bool m_drawIfPossibleFailed; | 155 bool m_drawIfPossibleFailed; |
| 153 TextureState m_textureState; | 156 TextureState m_textureState; |
| 154 ContextState m_contextState; | 157 ContextState m_contextState; |
| 155 | 158 |
| 156 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 159 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 157 }; | 160 }; |
| 158 | 161 |
| 159 } | 162 } |
| 160 | 163 |
| 161 #endif // CCSchedulerStateMachine_h | 164 #endif // CCSchedulerStateMachine_h |
| OLD | NEW |