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 <memory> | 10 #include <memory> |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 public: | 197 public: |
198 TestScheduler( | 198 TestScheduler( |
199 base::SimpleTestTickClock* now_src, | 199 base::SimpleTestTickClock* now_src, |
200 SchedulerClient* client, | 200 SchedulerClient* client, |
201 const SchedulerSettings& scheduler_settings, | 201 const SchedulerSettings& scheduler_settings, |
202 int layer_tree_host_id, | 202 int layer_tree_host_id, |
203 OrderedSimpleTaskRunner* task_runner, | 203 OrderedSimpleTaskRunner* task_runner, |
204 BeginFrameSource* begin_frame_source, | 204 BeginFrameSource* begin_frame_source, |
205 std::unique_ptr<CompositorTimingHistory> compositor_timing_history); | 205 std::unique_ptr<CompositorTimingHistory> compositor_timing_history); |
206 | 206 |
207 // Extra test helper functionality | |
208 bool IsBeginRetroFrameArgsEmpty() const { | |
209 return begin_retro_frame_args_.empty(); | |
210 } | |
211 | |
212 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } | 207 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } |
213 | 208 |
214 bool NeedsBeginMainFrame() const { | 209 bool NeedsBeginMainFrame() const { |
215 return state_machine_.needs_begin_main_frame(); | 210 return state_machine_.needs_begin_main_frame(); |
216 } | 211 } |
217 | 212 |
218 BeginFrameSource& frame_source() { return *begin_frame_source_; } | 213 BeginFrameSource& frame_source() { return *begin_frame_source_; } |
219 | 214 |
220 bool MainThreadMissedLastDeadline() const { | 215 bool MainThreadMissedLastDeadline() const { |
221 return state_machine_.main_thread_missed_last_deadline(); | 216 return state_machine_.main_thread_missed_last_deadline(); |
(...skipping 23 matching lines...) Expand all Loading... |
245 | 240 |
246 private: | 241 private: |
247 base::SimpleTestTickClock* now_src_; | 242 base::SimpleTestTickClock* now_src_; |
248 | 243 |
249 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 244 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
250 }; | 245 }; |
251 | 246 |
252 } // namespace cc | 247 } // namespace cc |
253 | 248 |
254 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 249 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |