| 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 "cc/scheduler/scheduler.h" | 5 #include "cc/scheduler/scheduler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 state_machine_.SetNeedsAnimate(); | 176 state_machine_.SetNeedsAnimate(); |
| 177 ProcessScheduledActions(); | 177 ProcessScheduledActions(); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void Scheduler::SetNeedsPrepareTiles() { | 180 void Scheduler::SetNeedsPrepareTiles() { |
| 181 DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_PREPARE_TILES)); | 181 DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_PREPARE_TILES)); |
| 182 state_machine_.SetNeedsPrepareTiles(); | 182 state_machine_.SetNeedsPrepareTiles(); |
| 183 ProcessScheduledActions(); | 183 ProcessScheduledActions(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void Scheduler::SetWaitForReadyToDraw() { | |
| 187 state_machine_.SetWaitForReadyToDraw(); | |
| 188 ProcessScheduledActions(); | |
| 189 } | |
| 190 | |
| 191 void Scheduler::SetMaxSwapsPending(int max) { | 186 void Scheduler::SetMaxSwapsPending(int max) { |
| 192 state_machine_.SetMaxSwapsPending(max); | 187 state_machine_.SetMaxSwapsPending(max); |
| 193 } | 188 } |
| 194 | 189 |
| 195 void Scheduler::DidSwapBuffers() { | 190 void Scheduler::DidSwapBuffers() { |
| 196 state_machine_.DidSwapBuffers(); | 191 state_machine_.DidSwapBuffers(); |
| 197 | 192 |
| 198 // There is no need to call ProcessScheduledActions here because | 193 // There is no need to call ProcessScheduledActions here because |
| 199 // swapping should not trigger any new actions. | 194 // swapping should not trigger any new actions. |
| 200 if (!inside_process_scheduled_actions_) { | 195 if (!inside_process_scheduled_actions_) { |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 } | 809 } |
| 815 | 810 |
| 816 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 811 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
| 817 return (state_machine_.commit_state() == | 812 return (state_machine_.commit_state() == |
| 818 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || | 813 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || |
| 819 state_machine_.commit_state() == | 814 state_machine_.commit_state() == |
| 820 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); | 815 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); |
| 821 } | 816 } |
| 822 | 817 |
| 823 } // namespace cc | 818 } // namespace cc |
| OLD | NEW |