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

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

Issue 845393002: cc: Create ProxyBeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 10 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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 class TestScheduler : public Scheduler { 159 class TestScheduler : public Scheduler {
160 public: 160 public:
161 static scoped_ptr<TestScheduler> Create( 161 static scoped_ptr<TestScheduler> Create(
162 scoped_refptr<TestNowSource> now_src, 162 scoped_refptr<TestNowSource> now_src,
163 SchedulerClient* client, 163 SchedulerClient* client,
164 const SchedulerSettings& scheduler_settings, 164 const SchedulerSettings& scheduler_settings,
165 int layer_tree_host_id, 165 int layer_tree_host_id,
166 const scoped_refptr<OrderedSimpleTaskRunner>& task_runner, 166 const scoped_refptr<OrderedSimpleTaskRunner>& task_runner,
167 base::PowerMonitor* power_monitor, 167 base::PowerMonitor* power_monitor,
168 scoped_ptr<BeginFrameSource> external_begin_frame_source) { 168 scoped_ptr<BeginFrameSource> external_begin_frame_source,
169 ProxyBeginFrameSource* proxy_begin_frame_source) {
169 TestSchedulerFrameSourcesConstructor frame_sources_constructor( 170 TestSchedulerFrameSourcesConstructor frame_sources_constructor(
170 task_runner.get(), now_src.get()); 171 task_runner.get(), now_src.get());
171 return make_scoped_ptr(new TestScheduler( 172 return make_scoped_ptr(new TestScheduler(
172 now_src, 173 now_src,
173 client, 174 client,
174 scheduler_settings, 175 scheduler_settings,
175 layer_tree_host_id, 176 layer_tree_host_id,
176 task_runner, 177 task_runner,
177 power_monitor, 178 power_monitor,
178 &frame_sources_constructor, 179 &frame_sources_constructor,
179 external_begin_frame_source.Pass())); 180 external_begin_frame_source.Pass(),
181 proxy_begin_frame_source));
180 } 182 }
181 183
182 // Extra test helper functionality 184 // Extra test helper functionality
183 bool IsBeginRetroFrameArgsEmpty() const { 185 bool IsBeginRetroFrameArgsEmpty() const {
184 return begin_retro_frame_args_.empty(); 186 return begin_retro_frame_args_.empty();
185 } 187 }
186 188
187 bool CanStart() const { return state_machine_.CanStartForTesting(); } 189 bool CanStart() const { return state_machine_.CanStartForTesting(); }
188 190
189 BeginFrameSource& frame_source() { return *frame_source_; } 191 BeginFrameSource& frame_source() { return *frame_source_; }
(...skipping 14 matching lines...) Expand all
204 206
205 private: 207 private:
206 TestScheduler( 208 TestScheduler(
207 scoped_refptr<TestNowSource> now_src, 209 scoped_refptr<TestNowSource> now_src,
208 SchedulerClient* client, 210 SchedulerClient* client,
209 const SchedulerSettings& scheduler_settings, 211 const SchedulerSettings& scheduler_settings,
210 int layer_tree_host_id, 212 int layer_tree_host_id,
211 const scoped_refptr<OrderedSimpleTaskRunner>& test_task_runner, 213 const scoped_refptr<OrderedSimpleTaskRunner>& test_task_runner,
212 base::PowerMonitor* power_monitor, 214 base::PowerMonitor* power_monitor,
213 TestSchedulerFrameSourcesConstructor* frame_sources_constructor, 215 TestSchedulerFrameSourcesConstructor* frame_sources_constructor,
214 scoped_ptr<BeginFrameSource> external_begin_frame_source); 216 scoped_ptr<BeginFrameSource> external_begin_frame_source,
217 ProxyBeginFrameSource* proxy_begin_frame_source);
215 218
216 scoped_refptr<TestNowSource> now_src_; 219 scoped_refptr<TestNowSource> now_src_;
217 }; 220 };
218 221
219 } // namespace cc 222 } // namespace cc
220 223
221 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ 224 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698