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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 return begin_retro_frame_args_.empty(); | 226 return begin_retro_frame_args_.empty(); |
227 } | 227 } |
228 | 228 |
229 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } | 229 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } |
230 | 230 |
231 bool NeedsBeginMainFrame() const { | 231 bool NeedsBeginMainFrame() const { |
232 return state_machine_.needs_begin_main_frame(); | 232 return state_machine_.needs_begin_main_frame(); |
233 } | 233 } |
234 | 234 |
235 BeginFrameSource& frame_source() { return *begin_frame_source_; } | 235 BeginFrameSource& frame_source() { return *begin_frame_source_; } |
236 bool FrameProductionThrottled() { | |
237 return settings_.throttle_frame_production; | |
238 } | |
239 | 236 |
240 bool MainThreadMissedLastDeadline() const { | 237 bool MainThreadMissedLastDeadline() const { |
241 return state_machine_.main_thread_missed_last_deadline(); | 238 return state_machine_.main_thread_missed_last_deadline(); |
242 } | 239 } |
243 | 240 |
244 bool begin_frames_expected() const { return observing_begin_frame_source_; } | 241 bool begin_frames_expected() const { return observing_begin_frame_source_; } |
245 | 242 |
246 ~TestScheduler() override; | 243 ~TestScheduler() override; |
247 | 244 |
248 base::TimeDelta BeginImplFrameInterval() { | 245 base::TimeDelta BeginImplFrameInterval() { |
(...skipping 14 matching lines...) Expand all Loading... |
263 | 260 |
264 private: | 261 private: |
265 base::SimpleTestTickClock* now_src_; | 262 base::SimpleTestTickClock* now_src_; |
266 | 263 |
267 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 264 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
268 }; | 265 }; |
269 | 266 |
270 } // namespace cc | 267 } // namespace cc |
271 | 268 |
272 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 269 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |