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

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

Issue 1887243002: cc: Remove retro frames from scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 <memory> 10 #include <memory>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 public: 197 public:
198 TestScheduler( 198 TestScheduler(
199 base::SimpleTestTickClock* now_src, 199 base::SimpleTestTickClock* now_src,
200 SchedulerClient* client, 200 SchedulerClient* client,
201 const SchedulerSettings& scheduler_settings, 201 const SchedulerSettings& scheduler_settings,
202 int layer_tree_host_id, 202 int layer_tree_host_id,
203 OrderedSimpleTaskRunner* task_runner, 203 OrderedSimpleTaskRunner* task_runner,
204 BeginFrameSource* begin_frame_source, 204 BeginFrameSource* begin_frame_source,
205 std::unique_ptr<CompositorTimingHistory> compositor_timing_history); 205 std::unique_ptr<CompositorTimingHistory> compositor_timing_history);
206 206
207 // Extra test helper functionality
208 bool IsBeginRetroFrameArgsEmpty() const {
209 return begin_retro_frame_args_.empty();
210 }
211
212 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } 207 bool SwapThrottled() const { return state_machine_.SwapThrottled(); }
213 208
214 bool NeedsBeginMainFrame() const { 209 bool NeedsBeginMainFrame() const {
215 return state_machine_.needs_begin_main_frame(); 210 return state_machine_.needs_begin_main_frame();
216 } 211 }
217 212
218 BeginFrameSource& frame_source() { return *begin_frame_source_; } 213 BeginFrameSource& frame_source() { return *begin_frame_source_; }
219 214
220 bool MainThreadMissedLastDeadline() const { 215 bool MainThreadMissedLastDeadline() const {
221 return state_machine_.main_thread_missed_last_deadline(); 216 return state_machine_.main_thread_missed_last_deadline();
(...skipping 23 matching lines...) Expand all
245 240
246 private: 241 private:
247 base::SimpleTestTickClock* now_src_; 242 base::SimpleTestTickClock* now_src_;
248 243
249 DISALLOW_COPY_AND_ASSIGN(TestScheduler); 244 DISALLOW_COPY_AND_ASSIGN(TestScheduler);
250 }; 245 };
251 246
252 } // namespace cc 247 } // namespace cc
253 248
254 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ 249 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698