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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 BeginFrameSource* external_frame_source, | 208 BeginFrameSource* external_frame_source, |
209 scoped_ptr<CompositorTimingHistory> compositor_timing_history); | 209 scoped_ptr<CompositorTimingHistory> compositor_timing_history); |
210 | 210 |
211 // Extra test helper functionality | 211 // Extra test helper functionality |
212 bool IsBeginRetroFrameArgsEmpty() const { | 212 bool IsBeginRetroFrameArgsEmpty() const { |
213 return begin_retro_frame_args_.empty(); | 213 return begin_retro_frame_args_.empty(); |
214 } | 214 } |
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(); } | |
219 | |
220 bool NeedsBeginMainFrame() const { | 218 bool NeedsBeginMainFrame() const { |
221 return state_machine_.needs_begin_main_frame(); | 219 return state_machine_.needs_begin_main_frame(); |
222 } | 220 } |
223 | 221 |
224 BeginFrameSource& frame_source() { return *frame_source_; } | 222 BeginFrameSource& frame_source() { return *frame_source_; } |
225 bool FrameProductionThrottled() { return throttle_frame_production_; } | 223 bool FrameProductionThrottled() { return throttle_frame_production_; } |
226 | 224 |
227 bool MainThreadMissedLastDeadline() const { | 225 bool MainThreadMissedLastDeadline() const { |
228 return state_machine_.main_thread_missed_last_deadline(); | 226 return state_machine_.main_thread_missed_last_deadline(); |
229 } | 227 } |
(...skipping 21 matching lines...) Expand all Loading... |
251 scoped_ptr<CompositorTimingHistory> compositor_timing_history); | 249 scoped_ptr<CompositorTimingHistory> compositor_timing_history); |
252 | 250 |
253 base::SimpleTestTickClock* now_src_; | 251 base::SimpleTestTickClock* now_src_; |
254 | 252 |
255 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 253 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
256 }; | 254 }; |
257 | 255 |
258 } // namespace cc | 256 } // namespace cc |
259 | 257 |
260 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 258 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |