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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 class TestScheduler; | 136 class TestScheduler; |
137 class TestSchedulerFrameSourcesConstructor | 137 class TestSchedulerFrameSourcesConstructor |
138 : public SchedulerFrameSourcesConstructor { | 138 : public SchedulerFrameSourcesConstructor { |
139 public: | 139 public: |
140 ~TestSchedulerFrameSourcesConstructor() override; | 140 ~TestSchedulerFrameSourcesConstructor() override; |
141 | 141 |
142 protected: | 142 protected: |
143 BeginFrameSource* ConstructPrimaryFrameSource(Scheduler* scheduler) override; | 143 BeginFrameSource* ConstructPrimaryFrameSource(Scheduler* scheduler) override; |
144 BeginFrameSource* ConstructBackgroundFrameSource( | 144 BeginFrameSource* ConstructBackgroundFrameSource( |
145 Scheduler* scheduler) override; | 145 Scheduler* scheduler) override; |
| 146 BeginFrameSource* ConstructUnthrottledFrameSource( |
| 147 Scheduler* scheduler) override; |
146 | 148 |
147 OrderedSimpleTaskRunner* test_task_runner_; | 149 OrderedSimpleTaskRunner* test_task_runner_; |
148 TestNowSource* now_src_; | 150 TestNowSource* now_src_; |
149 | 151 |
150 protected: | 152 protected: |
151 explicit TestSchedulerFrameSourcesConstructor( | 153 explicit TestSchedulerFrameSourcesConstructor( |
152 OrderedSimpleTaskRunner* test_task_runner, | 154 OrderedSimpleTaskRunner* test_task_runner, |
153 TestNowSource* now_src); | 155 TestNowSource* now_src); |
154 friend class TestScheduler; | 156 friend class TestScheduler; |
155 }; | 157 }; |
(...skipping 22 matching lines...) Expand all Loading... |
178 } | 180 } |
179 | 181 |
180 // Extra test helper functionality | 182 // Extra test helper functionality |
181 bool IsBeginRetroFrameArgsEmpty() const { | 183 bool IsBeginRetroFrameArgsEmpty() const { |
182 return begin_retro_frame_args_.empty(); | 184 return begin_retro_frame_args_.empty(); |
183 } | 185 } |
184 | 186 |
185 bool CanStart() const { return state_machine_.CanStartForTesting(); } | 187 bool CanStart() const { return state_machine_.CanStartForTesting(); } |
186 | 188 |
187 BeginFrameSource& frame_source() { return *frame_source_; } | 189 BeginFrameSource& frame_source() { return *frame_source_; } |
| 190 bool FrameProductionThrottled() { return throttle_frame_production_; } |
188 | 191 |
189 ~TestScheduler() override; | 192 ~TestScheduler() override; |
190 | 193 |
191 void NotifyReadyToCommitThenActivateIfNeeded() { | 194 void NotifyReadyToCommitThenActivateIfNeeded() { |
192 NotifyReadyToCommit(); | 195 NotifyReadyToCommit(); |
193 if (settings_.impl_side_painting) { | 196 if (settings_.impl_side_painting) { |
194 NotifyReadyToActivate(); | 197 NotifyReadyToActivate(); |
195 } | 198 } |
196 } | 199 } |
197 | 200 |
(...skipping 11 matching lines...) Expand all Loading... |
209 base::PowerMonitor* power_monitor, | 212 base::PowerMonitor* power_monitor, |
210 TestSchedulerFrameSourcesConstructor* frame_sources_constructor, | 213 TestSchedulerFrameSourcesConstructor* frame_sources_constructor, |
211 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 214 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
212 | 215 |
213 scoped_refptr<TestNowSource> now_src_; | 216 scoped_refptr<TestNowSource> now_src_; |
214 }; | 217 }; |
215 | 218 |
216 } // namespace cc | 219 } // namespace cc |
217 | 220 |
218 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 221 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |