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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 return begin_retro_frame_args_.empty(); | 213 return begin_retro_frame_args_.empty(); |
214 } | 214 } |
215 | 215 |
216 bool CanStart() const { return state_machine_.CanStartForTesting(); } | 216 bool CanStart() const { return state_machine_.CanStartForTesting(); } |
217 | 217 |
218 bool NeedsCommit() const { return state_machine_.needs_commit(); } | 218 bool NeedsCommit() const { return state_machine_.needs_commit(); } |
219 | 219 |
220 BeginFrameSource& frame_source() { return *frame_source_; } | 220 BeginFrameSource& frame_source() { return *frame_source_; } |
221 bool FrameProductionThrottled() { return throttle_frame_production_; } | 221 bool FrameProductionThrottled() { return throttle_frame_production_; } |
222 | 222 |
223 bool MainThreadIsInHighLatencyMode() const { | 223 bool MainThreadMissedLastDeadline() const { |
224 return state_machine_.MainThreadIsInHighLatencyMode(); | 224 return state_machine_.main_thread_missed_last_deadline(); |
225 } | 225 } |
226 | 226 |
227 bool WasSwapThrottledAtLastBeginFrame() const { | 227 bool WasSwapThrottledAtLastBeginFrame() const { |
228 return was_swap_throttled_at_last_begin_frame_; | 228 return was_swap_throttled_at_last_begin_frame_; |
229 } | 229 } |
230 | 230 |
231 ~TestScheduler() override; | 231 ~TestScheduler() override; |
232 | 232 |
233 base::TimeDelta BeginImplFrameInterval() { | 233 base::TimeDelta BeginImplFrameInterval() { |
234 return begin_impl_frame_tracker_.Interval(); | 234 return begin_impl_frame_tracker_.Interval(); |
(...skipping 18 matching lines...) Expand all Loading... |
253 | 253 |
254 base::SimpleTestTickClock* now_src_; | 254 base::SimpleTestTickClock* now_src_; |
255 bool was_swap_throttled_at_last_begin_frame_; | 255 bool was_swap_throttled_at_last_begin_frame_; |
256 | 256 |
257 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 257 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
258 }; | 258 }; |
259 | 259 |
260 } // namespace cc | 260 } // namespace cc |
261 | 261 |
262 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 262 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |