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

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

Issue 1774323003: Allow cc::Scheduler begin frame source to be changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scheduler_always_external
Patch Set: Add early out Created 4 years, 9 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 return begin_retro_frame_args_.empty(); 226 return begin_retro_frame_args_.empty();
227 } 227 }
228 228
229 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } 229 bool SwapThrottled() const { return state_machine_.SwapThrottled(); }
230 230
231 bool NeedsBeginMainFrame() const { 231 bool NeedsBeginMainFrame() const {
232 return state_machine_.needs_begin_main_frame(); 232 return state_machine_.needs_begin_main_frame();
233 } 233 }
234 234
235 BeginFrameSource& frame_source() { return *begin_frame_source_; } 235 BeginFrameSource& frame_source() { return *begin_frame_source_; }
236 bool FrameProductionThrottled() {
237 return settings_.throttle_frame_production;
238 }
239 236
240 bool MainThreadMissedLastDeadline() const { 237 bool MainThreadMissedLastDeadline() const {
241 return state_machine_.main_thread_missed_last_deadline(); 238 return state_machine_.main_thread_missed_last_deadline();
242 } 239 }
243 240
244 bool begin_frames_expected() const { return observing_begin_frame_source_; } 241 bool begin_frames_expected() const { return observing_begin_frame_source_; }
245 242
246 ~TestScheduler() override; 243 ~TestScheduler() override;
247 244
248 base::TimeDelta BeginImplFrameInterval() { 245 base::TimeDelta BeginImplFrameInterval() {
(...skipping 14 matching lines...) Expand all
263 260
264 private: 261 private:
265 base::SimpleTestTickClock* now_src_; 262 base::SimpleTestTickClock* now_src_;
266 263
267 DISALLOW_COPY_AND_ASSIGN(TestScheduler); 264 DISALLOW_COPY_AND_ASSIGN(TestScheduler);
268 }; 265 };
269 266
270 } // namespace cc 267 } // namespace cc
271 268
272 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ 269 #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