| 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 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "CCScheduler.h" | 7 #include "CCScheduler.h" |
| 8 | 8 |
| 9 #include "TraceEvent.h" | 9 #include "TraceEvent.h" |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 processScheduledActions(); | 115 processScheduledActions(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void CCScheduler::didRecreateContext() | 118 void CCScheduler::didRecreateContext() |
| 119 { | 119 { |
| 120 TRACE_EVENT0("cc", "CCScheduler::didRecreateContext"); | 120 TRACE_EVENT0("cc", "CCScheduler::didRecreateContext"); |
| 121 m_stateMachine.didRecreateContext(); | 121 m_stateMachine.didRecreateContext(); |
| 122 processScheduledActions(); | 122 processScheduledActions(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void CCScheduler::setTimebaseAndInterval(double timebase, double intervalSeconds
) | 125 void CCScheduler::setTimebaseAndInterval(base::TimeTicks timebase, base::TimeDel
ta interval) |
| 126 { | 126 { |
| 127 m_frameRateController->setTimebaseAndInterval(timebase, intervalSeconds); | 127 m_frameRateController->setTimebaseAndInterval(timebase, interval); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void CCScheduler::vsyncTick() | 130 void CCScheduler::vsyncTick() |
| 131 { | 131 { |
| 132 TRACE_EVENT0("cc", "CCScheduler::vsyncTick"); | 132 TRACE_EVENT0("cc", "CCScheduler::vsyncTick"); |
| 133 m_stateMachine.didEnterVSync(); | 133 m_stateMachine.didEnterVSync(); |
| 134 processScheduledActions(); | 134 processScheduledActions(); |
| 135 m_stateMachine.didLeaveVSync(); | 135 m_stateMachine.didLeaveVSync(); |
| 136 | 136 |
| 137 // Allow resource updates until next vsync tick. | 137 // Allow resource updates until next vsync tick. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 m_client->scheduledActionAcquireLayerTexturesForMainThread(); | 196 m_client->scheduledActionAcquireLayerTexturesForMainThread(); |
| 197 break; | 197 break; |
| 198 } | 198 } |
| 199 } while (action != CCSchedulerStateMachine::ACTION_NONE); | 199 } while (action != CCSchedulerStateMachine::ACTION_NONE); |
| 200 | 200 |
| 201 // Activate or deactivate the frame rate controller. | 201 // Activate or deactivate the frame rate controller. |
| 202 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); | 202 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } | 205 } |
| OLD | NEW |