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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 return begin_retro_frame_args_.empty(); | 227 return begin_retro_frame_args_.empty(); |
228 } | 228 } |
229 | 229 |
230 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } | 230 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } |
231 | 231 |
232 bool NeedsBeginMainFrame() const { | 232 bool NeedsBeginMainFrame() const { |
233 return state_machine_.needs_begin_main_frame(); | 233 return state_machine_.needs_begin_main_frame(); |
234 } | 234 } |
235 | 235 |
236 BeginFrameSource& frame_source() { return *frame_source_; } | 236 BeginFrameSource& frame_source() { return *frame_source_; } |
237 bool FrameProductionThrottled() { return throttle_frame_production_; } | 237 bool FrameProductionThrottled() { |
| 238 return settings_.throttle_frame_production; |
| 239 } |
238 | 240 |
239 bool MainThreadMissedLastDeadline() const { | 241 bool MainThreadMissedLastDeadline() const { |
240 return state_machine_.main_thread_missed_last_deadline(); | 242 return state_machine_.main_thread_missed_last_deadline(); |
241 } | 243 } |
242 | 244 |
243 bool begin_frames_expected() const { return observing_frame_source_; } | 245 bool begin_frames_expected() const { return observing_frame_source_; } |
244 | 246 |
245 ~TestScheduler() override; | 247 ~TestScheduler() override; |
246 | 248 |
247 base::TimeDelta BeginImplFrameInterval() { | 249 base::TimeDelta BeginImplFrameInterval() { |
(...skipping 25 matching lines...) Expand all Loading... |
273 scoped_ptr<CompositorTimingHistory> compositor_timing_history); | 275 scoped_ptr<CompositorTimingHistory> compositor_timing_history); |
274 | 276 |
275 base::SimpleTestTickClock* now_src_; | 277 base::SimpleTestTickClock* now_src_; |
276 | 278 |
277 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 279 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
278 }; | 280 }; |
279 | 281 |
280 } // namespace cc | 282 } // namespace cc |
281 | 283 |
282 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 284 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |