| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 frame_source_->SetActiveSource(unthrottled_frame_source_.get()); | 165 frame_source_->SetActiveSource(unthrottled_frame_source_.get()); |
| 166 } | 166 } |
| 167 ProcessScheduledActions(); | 167 ProcessScheduledActions(); |
| 168 } | 168 } |
| 169 | 169 |
| 170 void Scheduler::SetNeedsBeginMainFrame() { | 170 void Scheduler::SetNeedsBeginMainFrame() { |
| 171 state_machine_.SetNeedsBeginMainFrame(); | 171 state_machine_.SetNeedsBeginMainFrame(); |
| 172 ProcessScheduledActions(); | 172 ProcessScheduledActions(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void Scheduler::SetNeedsOneBeginImplFrame() { |
| 176 state_machine_.SetNeedsOneBeginImplFrame(); |
| 177 ProcessScheduledActions(); |
| 178 } |
| 179 |
| 175 void Scheduler::SetNeedsRedraw() { | 180 void Scheduler::SetNeedsRedraw() { |
| 176 state_machine_.SetNeedsRedraw(); | 181 state_machine_.SetNeedsRedraw(); |
| 177 ProcessScheduledActions(); | 182 ProcessScheduledActions(); |
| 178 } | 183 } |
| 179 | 184 |
| 180 void Scheduler::SetNeedsAnimate() { | 185 void Scheduler::SetNeedsAnimate() { |
| 181 state_machine_.SetNeedsAnimate(); | 186 state_machine_.SetNeedsAnimate(); |
| 182 ProcessScheduledActions(); | 187 ProcessScheduledActions(); |
| 183 } | 188 } |
| 184 | 189 |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 } | 842 } |
| 838 | 843 |
| 839 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 844 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
| 840 return (state_machine_.begin_main_frame_state() == | 845 return (state_machine_.begin_main_frame_state() == |
| 841 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || | 846 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || |
| 842 state_machine_.begin_main_frame_state() == | 847 state_machine_.begin_main_frame_state() == |
| 843 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); | 848 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); |
| 844 } | 849 } |
| 845 | 850 |
| 846 } // namespace cc | 851 } // namespace cc |
| OLD | NEW |