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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 BeginFrameSource* external_frame_source, | 206 BeginFrameSource* external_frame_source, |
207 scoped_ptr<CompositorTimingHistory> compositor_timing_history); | 207 scoped_ptr<CompositorTimingHistory> compositor_timing_history); |
208 | 208 |
209 // Extra test helper functionality | 209 // Extra test helper functionality |
210 bool IsBeginRetroFrameArgsEmpty() const { | 210 bool IsBeginRetroFrameArgsEmpty() const { |
211 return begin_retro_frame_args_.empty(); | 211 return begin_retro_frame_args_.empty(); |
212 } | 212 } |
213 | 213 |
214 bool CanStart() const { return state_machine_.CanStartForTesting(); } | 214 bool CanStart() const { return state_machine_.CanStartForTesting(); } |
215 | 215 |
| 216 bool NeedsCommit() const { return state_machine_.needs_commit(); } |
| 217 |
216 BeginFrameSource& frame_source() { return *frame_source_; } | 218 BeginFrameSource& frame_source() { return *frame_source_; } |
217 bool FrameProductionThrottled() { return throttle_frame_production_; } | 219 bool FrameProductionThrottled() { return throttle_frame_production_; } |
218 | 220 |
| 221 bool MainThreadIsInHighLatencyMode() const { |
| 222 return state_machine_.MainThreadIsInHighLatencyMode(); |
| 223 } |
| 224 |
219 ~TestScheduler() override; | 225 ~TestScheduler() override; |
220 | 226 |
221 base::TimeDelta BeginImplFrameInterval() { | 227 base::TimeDelta BeginImplFrameInterval() { |
222 return begin_impl_frame_tracker_.Interval(); | 228 return begin_impl_frame_tracker_.Interval(); |
223 } | 229 } |
224 | 230 |
225 protected: | 231 protected: |
226 // Overridden from Scheduler. | 232 // Overridden from Scheduler. |
227 base::TimeTicks Now() const override; | 233 base::TimeTicks Now() const override; |
228 | 234 |
(...skipping 10 matching lines...) Expand all Loading... |
239 scoped_ptr<CompositorTimingHistory> compositor_timing_history); | 245 scoped_ptr<CompositorTimingHistory> compositor_timing_history); |
240 | 246 |
241 base::SimpleTestTickClock* now_src_; | 247 base::SimpleTestTickClock* now_src_; |
242 | 248 |
243 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 249 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
244 }; | 250 }; |
245 | 251 |
246 } // namespace cc | 252 } // namespace cc |
247 | 253 |
248 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 254 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |