| 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. | |
| 98 void setNeedsForcedCommit(); | 96 void setNeedsForcedCommit(); |
| 99 | 97 |
| 100 // Call this only in response to receiving an ACTION_BEGIN_FRAME | 98 // Call this only in response to receiving an ACTION_BEGIN_FRAME |
| 101 // from nextState. Indicates that all painting is complete. | 99 // from nextState. Indicates that all painting is complete. |
| 102 void beginFrameComplete(); | 100 void beginFrameComplete(); |
| 103 | 101 |
| 104 // Call this only in response to receiving an ACTION_BEGIN_FRAME | 102 // Call this only in response to receiving an ACTION_BEGIN_FRAME |
| 105 // from nextState if the client rejects the beginFrame message. | 103 // from nextState if the client rejects the beginFrame message. |
| 106 void beginFrameAborted(); | 104 void beginFrameAborted(); |
| 107 | 105 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 137 |
| 140 int m_currentFrameNumber; | 138 int m_currentFrameNumber; |
| 141 int m_lastFrameNumberWhereDrawWasCalled; | 139 int m_lastFrameNumberWhereDrawWasCalled; |
| 142 int m_consecutiveFailedDraws; | 140 int m_consecutiveFailedDraws; |
| 143 int m_maximumNumberOfFailedDrawsBeforeDrawIsForced; | 141 int m_maximumNumberOfFailedDrawsBeforeDrawIsForced; |
| 144 bool m_needsRedraw; | 142 bool m_needsRedraw; |
| 145 bool m_needsForcedRedraw; | 143 bool m_needsForcedRedraw; |
| 146 bool m_needsForcedRedrawAfterNextCommit; | 144 bool m_needsForcedRedrawAfterNextCommit; |
| 147 bool m_needsCommit; | 145 bool m_needsCommit; |
| 148 bool m_needsForcedCommit; | 146 bool m_needsForcedCommit; |
| 149 bool m_expectImmediateBeginFrame; | |
| 150 bool m_mainThreadNeedsLayerTextures; | 147 bool m_mainThreadNeedsLayerTextures; |
| 151 bool m_insideVSync; | 148 bool m_insideVSync; |
| 152 bool m_visible; | 149 bool m_visible; |
| 153 bool m_canBeginFrame; | 150 bool m_canBeginFrame; |
| 154 bool m_canDraw; | 151 bool m_canDraw; |
| 155 bool m_drawIfPossibleFailed; | 152 bool m_drawIfPossibleFailed; |
| 156 TextureState m_textureState; | 153 TextureState m_textureState; |
| 157 ContextState m_contextState; | 154 ContextState m_contextState; |
| 158 | 155 |
| 159 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 156 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 160 }; | 157 }; |
| 161 | 158 |
| 162 } | 159 } |
| 163 | 160 |
| 164 #endif // CCSchedulerStateMachine_h | 161 #endif // CCSchedulerStateMachine_h |
| OLD | NEW |