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 "cc/scheduler.h" | 7 #include "cc/scheduler.h" |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 } | 46 } |
47 | 47 |
48 void Scheduler::setNeedsCommit() | 48 void Scheduler::setNeedsCommit() |
49 { | 49 { |
50 m_stateMachine.setNeedsCommit(); | 50 m_stateMachine.setNeedsCommit(); |
51 processScheduledActions(); | 51 processScheduledActions(); |
52 } | 52 } |
53 | 53 |
54 void Scheduler::setNeedsForcedCommit() | 54 void Scheduler::setNeedsForcedCommit() |
55 { | 55 { |
56 m_stateMachine.setNeedsCommit(); | |
57 m_stateMachine.setNeedsForcedCommit(); | 56 m_stateMachine.setNeedsForcedCommit(); |
58 processScheduledActions(); | 57 processScheduledActions(); |
59 } | 58 } |
60 | 59 |
61 void Scheduler::setNeedsRedraw() | 60 void Scheduler::setNeedsRedraw() |
62 { | 61 { |
63 m_stateMachine.setNeedsRedraw(); | 62 m_stateMachine.setNeedsRedraw(); |
64 processScheduledActions(); | 63 processScheduledActions(); |
65 } | 64 } |
66 | 65 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 184 } |
186 action = m_stateMachine.nextAction(); | 185 action = m_stateMachine.nextAction(); |
187 } | 186 } |
188 | 187 |
189 // Activate or deactivate the frame rate controller. | 188 // Activate or deactivate the frame rate controller. |
190 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); | 189 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); |
191 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime()
); | 190 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime()
); |
192 } | 191 } |
193 | 192 |
194 } // namespace cc | 193 } // namespace cc |
OLD | NEW |