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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } | 54 } |
55 | 55 |
56 TestBackToBackBeginFrameSource::~TestBackToBackBeginFrameSource() { | 56 TestBackToBackBeginFrameSource::~TestBackToBackBeginFrameSource() { |
57 } | 57 } |
58 | 58 |
59 base::TimeTicks TestBackToBackBeginFrameSource::Now() { | 59 base::TimeTicks TestBackToBackBeginFrameSource::Now() { |
60 return now_src_->NowTicks(); | 60 return now_src_->NowTicks(); |
61 } | 61 } |
62 | 62 |
63 TestSyntheticBeginFrameSource::TestSyntheticBeginFrameSource( | 63 TestSyntheticBeginFrameSource::TestSyntheticBeginFrameSource( |
64 scoped_ptr<DelayBasedTimeSource> time_source) | 64 base::SimpleTestTickClock* now_src, |
65 : SyntheticBeginFrameSource(std::move(time_source)) {} | 65 OrderedSimpleTaskRunner* task_runner, |
| 66 base::TimeDelta initial_interval) |
| 67 : SyntheticBeginFrameSource( |
| 68 TestDelayBasedTimeSource::Create(now_src, |
| 69 initial_interval, |
| 70 task_runner)) {} |
66 | 71 |
67 TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() { | 72 TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() { |
68 } | 73 } |
69 | 74 |
70 scoped_ptr<FakeCompositorTimingHistory> FakeCompositorTimingHistory::Create( | 75 scoped_ptr<FakeCompositorTimingHistory> FakeCompositorTimingHistory::Create( |
71 bool using_synchronous_renderer_compositor) { | 76 bool using_synchronous_renderer_compositor) { |
72 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation = | 77 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation = |
73 RenderingStatsInstrumentation::Create(); | 78 RenderingStatsInstrumentation::Create(); |
74 return make_scoped_ptr(new FakeCompositorTimingHistory( | 79 return make_scoped_ptr(new FakeCompositorTimingHistory( |
75 using_synchronous_renderer_compositor, | 80 using_synchronous_renderer_compositor, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 now_src_(now_src) {} | 203 now_src_(now_src) {} |
199 | 204 |
200 base::TimeTicks TestScheduler::Now() const { | 205 base::TimeTicks TestScheduler::Now() const { |
201 return now_src_->NowTicks(); | 206 return now_src_->NowTicks(); |
202 } | 207 } |
203 | 208 |
204 TestScheduler::~TestScheduler() { | 209 TestScheduler::~TestScheduler() { |
205 } | 210 } |
206 | 211 |
207 } // namespace cc | 212 } // namespace cc |
OLD | NEW |