| 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 <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 void SetSmoothnessTakesPriority(bool smoothness_takes_priority); | 92 void SetSmoothnessTakesPriority(bool smoothness_takes_priority); |
| 93 | 93 |
| 94 void NotifyReadyToCommit(); | 94 void NotifyReadyToCommit(); |
| 95 void BeginMainFrameAborted(bool did_handle); | 95 void BeginMainFrameAborted(bool did_handle); |
| 96 | 96 |
| 97 void DidManageTiles(); | 97 void DidManageTiles(); |
| 98 void DidLoseOutputSurface(); | 98 void DidLoseOutputSurface(); |
| 99 void DidCreateAndInitializeOutputSurface(); | 99 void DidCreateAndInitializeOutputSurface(); |
| 100 | 100 |
| 101 // Tests do not want to shut down until all possible BeginMainFrames have |
| 102 // occured to prevent flakiness. |
| 103 bool MainFrameForTestingWillHappen() const { |
| 104 return state_machine_.CommitPending() || |
| 105 state_machine_.CouldSendBeginMainFrame(); |
| 106 } |
| 107 |
| 101 bool CommitPending() const { return state_machine_.CommitPending(); } | 108 bool CommitPending() const { return state_machine_.CommitPending(); } |
| 102 bool RedrawPending() const { return state_machine_.RedrawPending(); } | 109 bool RedrawPending() const { return state_machine_.RedrawPending(); } |
| 103 bool ManageTilesPending() const { | 110 bool ManageTilesPending() const { |
| 104 return state_machine_.ManageTilesPending(); | 111 return state_machine_.ManageTilesPending(); |
| 105 } | 112 } |
| 106 bool MainThreadIsInHighLatencyMode() const { | 113 bool MainThreadIsInHighLatencyMode() const { |
| 107 return state_machine_.MainThreadIsInHighLatencyMode(); | 114 return state_machine_.MainThreadIsInHighLatencyMode(); |
| 108 } | 115 } |
| 109 bool BeginImplFrameDeadlinePending() const { | 116 bool BeginImplFrameDeadlinePending() const { |
| 110 return !begin_impl_frame_deadline_task_.IsCancelled(); | 117 return !begin_impl_frame_deadline_task_.IsCancelled(); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 void SetupSyntheticBeginFrames(); | 233 void SetupSyntheticBeginFrames(); |
| 227 | 234 |
| 228 base::WeakPtrFactory<Scheduler> weak_factory_; | 235 base::WeakPtrFactory<Scheduler> weak_factory_; |
| 229 | 236 |
| 230 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 237 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 231 }; | 238 }; |
| 232 | 239 |
| 233 } // namespace cc | 240 } // namespace cc |
| 234 | 241 |
| 235 #endif // CC_SCHEDULER_SCHEDULER_H_ | 242 #endif // CC_SCHEDULER_SCHEDULER_H_ |
| OLD | NEW |