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