Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: cc/test/scheduler_test_common.h

Issue 1229573004: cc: Simplify and rename MainThreadIsInHighLatency logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ignoreFirstDraws4
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(); } 218 bool CanStart() const { return state_machine_.CanStartForTesting(); }
219 219
220 bool NeedsCommit() const { return state_machine_.needs_commit(); } 220 bool NeedsCommit() const { return state_machine_.needs_commit(); }
221 221
222 BeginFrameSource& frame_source() { return *frame_source_; } 222 BeginFrameSource& frame_source() { return *frame_source_; }
223 bool FrameProductionThrottled() { return throttle_frame_production_; } 223 bool FrameProductionThrottled() { return throttle_frame_production_; }
224 224
225 bool MainThreadIsInHighLatencyMode() const { 225 bool MainThreadMissedLastDeadline() const {
226 return state_machine_.MainThreadIsInHighLatencyMode(); 226 return state_machine_.main_thread_missed_last_deadline();
227 } 227 }
228 228
229 ~TestScheduler() override; 229 ~TestScheduler() override;
230 230
231 base::TimeDelta BeginImplFrameInterval() { 231 base::TimeDelta BeginImplFrameInterval() {
232 return begin_impl_frame_tracker_.Interval(); 232 return begin_impl_frame_tracker_.Interval();
233 } 233 }
234 234
235 protected: 235 protected:
236 // Overridden from Scheduler. 236 // Overridden from Scheduler.
(...skipping 12 matching lines...) Expand all
249 scoped_ptr<CompositorTimingHistory> compositor_timing_history); 249 scoped_ptr<CompositorTimingHistory> compositor_timing_history);
250 250
251 base::SimpleTestTickClock* now_src_; 251 base::SimpleTestTickClock* now_src_;
252 252
253 DISALLOW_COPY_AND_ASSIGN(TestScheduler); 253 DISALLOW_COPY_AND_ASSIGN(TestScheduler);
254 }; 254 };
255 255
256 } // namespace cc 256 } // namespace cc
257 257
258 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ 258 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698