OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 void setNeedsForcedCommit(); | 87 void setNeedsForcedCommit(); |
88 | 88 |
89 void setNeedsRedraw(); | 89 void setNeedsRedraw(); |
90 | 90 |
91 void setMainThreadNeedsLayerTextures(); | 91 void setMainThreadNeedsLayerTextures(); |
92 | 92 |
93 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i
f we are not visible. | 93 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i
f we are not visible. |
94 void setNeedsForcedRedraw(); | 94 void setNeedsForcedRedraw(); |
95 | 95 |
96 void beginFrameComplete(); | 96 void beginFrameComplete(); |
| 97 void beginFrameAborted(); |
97 | 98 |
98 void setMaxFramesPending(int); | 99 void setMaxFramesPending(int); |
99 void didSwapBuffersComplete(); | 100 void didSwapBuffersComplete(); |
100 | 101 |
101 void didLoseContext(); | 102 void didLoseContext(); |
102 void didRecreateContext(); | 103 void didRecreateContext(); |
103 | 104 |
104 bool commitPending() const { return m_stateMachine.commitPending(); } | 105 bool commitPending() const { return m_stateMachine.commitPending(); } |
105 bool redrawPending() const { return m_stateMachine.redrawPending(); } | 106 bool redrawPending() const { return m_stateMachine.redrawPending(); } |
106 | 107 |
107 // CCFrameRateControllerClient implementation | 108 // CCFrameRateControllerClient implementation |
108 virtual void vsyncTick() OVERRIDE; | 109 virtual void vsyncTick() OVERRIDE; |
109 | 110 |
110 private: | 111 private: |
111 CCScheduler(CCSchedulerClient*, PassOwnPtr<CCFrameRateController>); | 112 CCScheduler(CCSchedulerClient*, PassOwnPtr<CCFrameRateController>); |
112 | 113 |
113 CCSchedulerStateMachine::Action nextAction(); | 114 CCSchedulerStateMachine::Action nextAction(); |
114 void processScheduledActions(); | 115 void processScheduledActions(); |
115 | 116 |
116 CCSchedulerClient* m_client; | 117 CCSchedulerClient* m_client; |
117 OwnPtr<CCFrameRateController> m_frameRateController; | 118 OwnPtr<CCFrameRateController> m_frameRateController; |
118 CCSchedulerStateMachine m_stateMachine; | 119 CCSchedulerStateMachine m_stateMachine; |
119 bool m_updateMoreResourcesPending; | 120 bool m_updateMoreResourcesPending; |
120 }; | 121 }; |
121 | 122 |
122 } | 123 } |
123 | 124 |
124 #endif // CCScheduler_h | 125 #endif // CCScheduler_h |
OLD | NEW |