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 { | |
enne (OOO)
2014/08/11 19:50:12
bikeshed: Will => Could?
danakj
2014/08/11 20:01:06
I had that at first, but it definitely will come,
enne (OOO)
2014/08/11 20:05:02
Ok, sure. :)
| |
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
227 void SetupSyntheticBeginFrames(); | 234 void SetupSyntheticBeginFrames(); |
228 | 235 |
229 base::WeakPtrFactory<Scheduler> weak_factory_; | 236 base::WeakPtrFactory<Scheduler> weak_factory_; |
230 | 237 |
231 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 238 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
232 }; | 239 }; |
233 | 240 |
234 } // namespace cc | 241 } // namespace cc |
235 | 242 |
236 #endif // CC_SCHEDULER_SCHEDULER_H_ | 243 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |