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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); | 152 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); |
153 return; | 153 return; |
154 } | 154 } |
155 | 155 |
156 // This function can re-enter itself. For example, draw may call | 156 // This function can re-enter itself. For example, draw may call |
157 // setNeedsCommit. Proceeed with caution. | 157 // setNeedsCommit. Proceeed with caution. |
158 CCSchedulerStateMachine::Action action; | 158 CCSchedulerStateMachine::Action action; |
159 do { | 159 do { |
160 action = nextAction(); | 160 action = nextAction(); |
161 m_stateMachine.updateState(action); | 161 m_stateMachine.updateState(action); |
| 162 TRACE_EVENT1("cc", "CCScheduler::processScheduledActions()", "action", a
ction); |
162 | 163 |
163 switch (action) { | 164 switch (action) { |
164 case CCSchedulerStateMachine::ACTION_NONE: | 165 case CCSchedulerStateMachine::ACTION_NONE: |
165 break; | 166 break; |
166 case CCSchedulerStateMachine::ACTION_BEGIN_FRAME: | 167 case CCSchedulerStateMachine::ACTION_BEGIN_FRAME: |
167 m_client->scheduledActionBeginFrame(); | 168 m_client->scheduledActionBeginFrame(); |
168 break; | 169 break; |
169 case CCSchedulerStateMachine::ACTION_BEGIN_UPDATE_MORE_RESOURCES: | 170 case CCSchedulerStateMachine::ACTION_BEGIN_UPDATE_MORE_RESOURCES: |
170 m_client->scheduledActionUpdateMoreResources(); | 171 m_client->scheduledActionUpdateMoreResources(); |
171 if (!m_client->hasMoreResourceUpdates()) { | 172 if (!m_client->hasMoreResourceUpdates()) { |
(...skipping 28 matching lines...) Expand all Loading... |
200 m_client->scheduledActionAcquireLayerTexturesForMainThread(); | 201 m_client->scheduledActionAcquireLayerTexturesForMainThread(); |
201 break; | 202 break; |
202 } | 203 } |
203 } while (action != CCSchedulerStateMachine::ACTION_NONE); | 204 } while (action != CCSchedulerStateMachine::ACTION_NONE); |
204 | 205 |
205 // Activate or deactivate the frame rate controller. | 206 // Activate or deactivate the frame rate controller. |
206 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); | 207 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); |
207 } | 208 } |
208 | 209 |
209 } | 210 } |
OLD | NEW |