| 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 #ifndef CC_SCHEDULER_SCHEDULER_H_ | 5 #ifndef CC_SCHEDULER_SCHEDULER_H_ |
| 6 #define CC_SCHEDULER_SCHEDULER_H_ | 6 #define CC_SCHEDULER_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 bool MainFrameForTestingWillHappen() const { | 110 bool MainFrameForTestingWillHappen() const { |
| 111 return state_machine_.CommitPending() || | 111 return state_machine_.CommitPending() || |
| 112 state_machine_.CouldSendBeginMainFrame(); | 112 state_machine_.CouldSendBeginMainFrame(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool CommitPending() const { return state_machine_.CommitPending(); } | 115 bool CommitPending() const { return state_machine_.CommitPending(); } |
| 116 bool RedrawPending() const { return state_machine_.RedrawPending(); } | 116 bool RedrawPending() const { return state_machine_.RedrawPending(); } |
| 117 bool PrepareTilesPending() const { | 117 bool PrepareTilesPending() const { |
| 118 return state_machine_.PrepareTilesPending(); | 118 return state_machine_.PrepareTilesPending(); |
| 119 } | 119 } |
| 120 bool BeginImplFrameDeadlinePending() const { | |
| 121 return !begin_impl_frame_deadline_task_.IsCancelled(); | |
| 122 } | |
| 123 bool ImplLatencyTakesPriority() const { | 120 bool ImplLatencyTakesPriority() const { |
| 124 return state_machine_.ImplLatencyTakesPriority(); | 121 return state_machine_.ImplLatencyTakesPriority(); |
| 125 } | 122 } |
| 126 | 123 |
| 127 // Pass in a main_thread_start_time of base::TimeTicks() if it is not | 124 // Pass in a main_thread_start_time of base::TimeTicks() if it is not |
| 128 // known or not trustworthy (e.g. blink is running on a remote channel) | 125 // known or not trustworthy (e.g. blink is running on a remote channel) |
| 129 // to signal that the start time isn't known and should not be used for | 126 // to signal that the start time isn't known and should not be used for |
| 130 // scheduling or statistics purposes. | 127 // scheduling or statistics purposes. |
| 131 void NotifyBeginMainFrameStarted(base::TimeTicks main_thread_start_time); | 128 void NotifyBeginMainFrameStarted(base::TimeTicks main_thread_start_time); |
| 132 | 129 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 } | 214 } |
| 218 | 215 |
| 219 base::WeakPtrFactory<Scheduler> weak_factory_; | 216 base::WeakPtrFactory<Scheduler> weak_factory_; |
| 220 | 217 |
| 221 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 218 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 222 }; | 219 }; |
| 223 | 220 |
| 224 } // namespace cc | 221 } // namespace cc |
| 225 | 222 |
| 226 #endif // CC_SCHEDULER_SCHEDULER_H_ | 223 #endif // CC_SCHEDULER_SCHEDULER_H_ |
| OLD | NEW |