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 #include "cc/debug/rendering_stats_instrumentation.h" | 10 #include "cc/debug/rendering_stats_instrumentation.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 FakeCompositorTimingHistory::FakeCompositorTimingHistory( | 76 FakeCompositorTimingHistory::FakeCompositorTimingHistory( |
77 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation) | 77 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation) |
78 : CompositorTimingHistory(rendering_stats_instrumentation.get()), | 78 : CompositorTimingHistory(rendering_stats_instrumentation.get()), |
79 rendering_stats_instrumentation_owned_( | 79 rendering_stats_instrumentation_owned_( |
80 rendering_stats_instrumentation.Pass()) { | 80 rendering_stats_instrumentation.Pass()) { |
81 } | 81 } |
82 | 82 |
83 FakeCompositorTimingHistory::~FakeCompositorTimingHistory() { | 83 FakeCompositorTimingHistory::~FakeCompositorTimingHistory() { |
84 } | 84 } |
85 | 85 |
| 86 void FakeCompositorTimingHistory::SetAllEstimatesTo(base::TimeDelta duration) { |
| 87 begin_main_frame_to_commit_duration_ = duration; |
| 88 commit_to_ready_to_activate_duration_ = duration; |
| 89 prepare_tiles_duration_ = duration; |
| 90 activate_duration_ = duration; |
| 91 draw_duration_ = duration; |
| 92 } |
| 93 |
86 void FakeCompositorTimingHistory::SetBeginMainFrameToCommitDurationEstimate( | 94 void FakeCompositorTimingHistory::SetBeginMainFrameToCommitDurationEstimate( |
87 base::TimeDelta duration) { | 95 base::TimeDelta duration) { |
88 begin_main_frame_to_commit_duration_ = duration; | 96 begin_main_frame_to_commit_duration_ = duration; |
89 } | 97 } |
90 | 98 |
91 void FakeCompositorTimingHistory::SetCommitToReadyToActivateDurationEstimate( | 99 void FakeCompositorTimingHistory::SetCommitToReadyToActivateDurationEstimate( |
92 base::TimeDelta duration) { | 100 base::TimeDelta duration) { |
93 commit_to_ready_to_activate_duration_ = duration; | 101 commit_to_ready_to_activate_duration_ = duration; |
94 } | 102 } |
95 | 103 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 182 } |
175 | 183 |
176 base::TimeTicks TestScheduler::Now() const { | 184 base::TimeTicks TestScheduler::Now() const { |
177 return now_src_->NowTicks(); | 185 return now_src_->NowTicks(); |
178 } | 186 } |
179 | 187 |
180 TestScheduler::~TestScheduler() { | 188 TestScheduler::~TestScheduler() { |
181 } | 189 } |
182 | 190 |
183 } // namespace cc | 191 } // namespace cc |
OLD | NEW |