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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 }; | 119 }; |
120 | 120 |
121 class TestScheduler : public Scheduler { | 121 class TestScheduler : public Scheduler { |
122 public: | 122 public: |
123 TestScheduler( | 123 TestScheduler( |
124 base::SimpleTestTickClock* now_src, | 124 base::SimpleTestTickClock* now_src, |
125 SchedulerClient* client, | 125 SchedulerClient* client, |
126 const SchedulerSettings& scheduler_settings, | 126 const SchedulerSettings& scheduler_settings, |
127 int layer_tree_host_id, | 127 int layer_tree_host_id, |
128 OrderedSimpleTaskRunner* task_runner, | 128 OrderedSimpleTaskRunner* task_runner, |
129 BeginFrameSource* begin_frame_source, | |
130 std::unique_ptr<CompositorTimingHistory> compositor_timing_history); | 129 std::unique_ptr<CompositorTimingHistory> compositor_timing_history); |
131 | 130 |
132 // Extra test helper functionality | 131 // Extra test helper functionality |
133 bool IsBeginRetroFrameArgsEmpty() const { | 132 bool IsBeginRetroFrameArgsEmpty() const { |
134 return begin_retro_frame_args_.empty(); | 133 return begin_retro_frame_args_.empty(); |
135 } | 134 } |
136 | 135 |
137 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } | 136 bool SwapThrottled() const { return state_machine_.SwapThrottled(); } |
138 | 137 |
139 bool NeedsBeginMainFrame() const { | 138 bool NeedsBeginMainFrame() const { |
(...skipping 30 matching lines...) Expand all Loading... |
170 | 169 |
171 private: | 170 private: |
172 base::SimpleTestTickClock* now_src_; | 171 base::SimpleTestTickClock* now_src_; |
173 | 172 |
174 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 173 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
175 }; | 174 }; |
176 | 175 |
177 } // namespace cc | 176 } // namespace cc |
178 | 177 |
179 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 178 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |