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_TEST_SCHEDULER_TEST_COMMON_H_ | 5 #ifndef CC_TEST_SCHEDULER_TEST_COMMON_H_ |
6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_ | 6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } | 216 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } |
217 | 217 |
218 bool CanStart() const { return state_machine_.CanStartForTesting(); } | 218 bool CanStart() const { return state_machine_.CanStartForTesting(); } |
219 | 219 |
220 bool NeedsCommit() const { return state_machine_.needs_commit(); } | 220 bool NeedsCommit() const { return state_machine_.needs_commit(); } |
221 | 221 |
222 BeginFrameSource& frame_source() { return *frame_source_; } | 222 BeginFrameSource& frame_source() { return *frame_source_; } |
223 bool FrameProductionThrottled() { return throttle_frame_production_; } | 223 bool FrameProductionThrottled() { return throttle_frame_production_; } |
224 | 224 |
225 bool MainThreadIsInHighLatencyMode() const { | 225 bool MainThreadMissedLastDeadline() const { |
226 return state_machine_.MainThreadIsInHighLatencyMode(); | 226 return state_machine_.main_thread_missed_last_deadline(); |
227 } | 227 } |
228 | 228 |
229 ~TestScheduler() override; | 229 ~TestScheduler() override; |
230 | 230 |
231 base::TimeDelta BeginImplFrameInterval() { | 231 base::TimeDelta BeginImplFrameInterval() { |
232 return begin_impl_frame_tracker_.Interval(); | 232 return begin_impl_frame_tracker_.Interval(); |
233 } | 233 } |
234 | 234 |
235 protected: | 235 protected: |
236 // Overridden from Scheduler. | 236 // Overridden from Scheduler. |
(...skipping 12 matching lines...) Expand all Loading... |
249 scoped_ptr<CompositorTimingHistory> compositor_timing_history); | 249 scoped_ptr<CompositorTimingHistory> compositor_timing_history); |
250 | 250 |
251 base::SimpleTestTickClock* now_src_; | 251 base::SimpleTestTickClock* now_src_; |
252 | 252 |
253 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 253 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
254 }; | 254 }; |
255 | 255 |
256 } // namespace cc | 256 } // namespace cc |
257 | 257 |
258 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 258 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |