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" |
| 11 #include "cc/cc_export.h" |
11 | 12 |
12 namespace cc { | 13 namespace cc { |
13 | 14 |
14 // The SchedulerStateMachine decides how to coordinate main thread activites | 15 // The SchedulerStateMachine decides how to coordinate main thread activites |
15 // like painting/running javascript with rendering and input activities on the | 16 // like painting/running javascript with rendering and input activities on the |
16 // impl thread. | 17 // impl thread. |
17 // | 18 // |
18 // The state machine tracks internal state but is also influenced by external st
ate. | 19 // The state machine tracks internal state but is also influenced by external st
ate. |
19 // Internal state includes things like whether a frame has been requested, while | 20 // Internal state includes things like whether a frame has been requested, while |
20 // external state includes things like the current time being near to the vblank
time. | 21 // external state includes things like the current time being near to the vblank
time. |
21 // | 22 // |
22 // The scheduler seperates "what to do next" from the updating of its internal s
tate to | 23 // The scheduler seperates "what to do next" from the updating of its internal s
tate to |
23 // make testing cleaner. | 24 // make testing cleaner. |
24 class SchedulerStateMachine { | 25 class CC_EXPORT SchedulerStateMachine { |
25 public: | 26 public: |
26 SchedulerStateMachine(); | 27 SchedulerStateMachine(); |
27 | 28 |
28 enum CommitState { | 29 enum CommitState { |
29 COMMIT_STATE_IDLE, | 30 COMMIT_STATE_IDLE, |
30 COMMIT_STATE_FRAME_IN_PROGRESS, | 31 COMMIT_STATE_FRAME_IN_PROGRESS, |
31 COMMIT_STATE_READY_TO_COMMIT, | 32 COMMIT_STATE_READY_TO_COMMIT, |
32 COMMIT_STATE_WAITING_FOR_FIRST_DRAW, | 33 COMMIT_STATE_WAITING_FOR_FIRST_DRAW, |
33 }; | 34 }; |
34 | 35 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 bool m_drawIfPossibleFailed; | 153 bool m_drawIfPossibleFailed; |
153 TextureState m_textureState; | 154 TextureState m_textureState; |
154 ContextState m_contextState; | 155 ContextState m_contextState; |
155 | 156 |
156 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 157 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
157 }; | 158 }; |
158 | 159 |
159 } | 160 } |
160 | 161 |
161 #endif // CCSchedulerStateMachine_h | 162 #endif // CCSchedulerStateMachine_h |
OLD | NEW |