| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "cc/test/scheduler_test_common.h" | 5 #include "cc/test/scheduler_test_common.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 now_src_, test_task_runner_, base::TimeDelta::FromSeconds(1)); | 120 now_src_, test_task_runner_, base::TimeDelta::FromSeconds(1)); |
| 121 return scheduler->background_frame_source_internal_.get(); | 121 return scheduler->background_frame_source_internal_.get(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 TestScheduler::TestScheduler( | 124 TestScheduler::TestScheduler( |
| 125 scoped_refptr<TestNowSource> now_src, | 125 scoped_refptr<TestNowSource> now_src, |
| 126 SchedulerClient* client, | 126 SchedulerClient* client, |
| 127 const SchedulerSettings& scheduler_settings, | 127 const SchedulerSettings& scheduler_settings, |
| 128 int layer_tree_host_id, | 128 int layer_tree_host_id, |
| 129 const scoped_refptr<OrderedSimpleTaskRunner>& test_task_runner, | 129 const scoped_refptr<OrderedSimpleTaskRunner>& test_task_runner, |
| 130 TestSchedulerFrameSourcesConstructor* frame_sources_constructor) | 130 TestSchedulerFrameSourcesConstructor* frame_sources_constructor, |
| 131 scoped_ptr<ExternalBeginFrameSource> external_begin_frame_source) |
| 131 : Scheduler(client, | 132 : Scheduler(client, |
| 132 scheduler_settings, | 133 scheduler_settings, |
| 133 layer_tree_host_id, | 134 layer_tree_host_id, |
| 134 test_task_runner, | 135 test_task_runner, |
| 136 external_begin_frame_source.Pass(), |
| 135 frame_sources_constructor), | 137 frame_sources_constructor), |
| 136 now_src_(now_src), | 138 now_src_(now_src), |
| 137 test_task_runner_(test_task_runner.get()) { | 139 test_task_runner_(test_task_runner.get()) { |
| 138 } | 140 } |
| 139 | 141 |
| 140 base::TimeTicks TestScheduler::Now() const { | 142 base::TimeTicks TestScheduler::Now() const { |
| 141 return now_src_->Now(); | 143 return now_src_->Now(); |
| 142 } | 144 } |
| 143 | 145 |
| 144 TestScheduler::~TestScheduler() { | 146 TestScheduler::~TestScheduler() { |
| 145 } | 147 } |
| 146 | 148 |
| 147 } // namespace cc | 149 } // namespace cc |
| OLD | NEW |