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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 private: | 160 private: |
161 DISALLOW_COPY_AND_ASSIGN(TestSyntheticBeginFrameSource); | 161 DISALLOW_COPY_AND_ASSIGN(TestSyntheticBeginFrameSource); |
162 }; | 162 }; |
163 | 163 |
164 class FakeCompositorTimingHistory : public CompositorTimingHistory { | 164 class FakeCompositorTimingHistory : public CompositorTimingHistory { |
165 public: | 165 public: |
166 static scoped_ptr<FakeCompositorTimingHistory> Create(); | 166 static scoped_ptr<FakeCompositorTimingHistory> Create(); |
167 ~FakeCompositorTimingHistory() override; | 167 ~FakeCompositorTimingHistory() override; |
168 | 168 |
| 169 void SetBeginMainFrameToCommitDurationEstimate(base::TimeDelta duration); |
| 170 void SetCommitToReadyToActivateDurationEstimate(base::TimeDelta duration); |
| 171 void SetPrepareTilesDurationEstimate(base::TimeDelta duration); |
| 172 void SetActivateDurationEstimate(base::TimeDelta duration); |
169 void SetDrawDurationEstimate(base::TimeDelta duration); | 173 void SetDrawDurationEstimate(base::TimeDelta duration); |
170 void SetBeginMainFrameToCommitDurationEstimate(base::TimeDelta duration); | |
171 void SetCommitToActivateDurationEstimate(base::TimeDelta duration); | |
172 | 174 |
| 175 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const override; |
| 176 base::TimeDelta CommitToReadyToActivateDurationEstimate() const override; |
| 177 base::TimeDelta PrepareTilesDurationEstimate() const override; |
| 178 base::TimeDelta ActivateDurationEstimate() const override; |
173 base::TimeDelta DrawDurationEstimate() const override; | 179 base::TimeDelta DrawDurationEstimate() const override; |
174 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const override; | |
175 base::TimeDelta CommitToActivateDurationEstimate() const override; | |
176 | 180 |
177 protected: | 181 protected: |
178 FakeCompositorTimingHistory(scoped_ptr<RenderingStatsInstrumentation> | 182 FakeCompositorTimingHistory(scoped_ptr<RenderingStatsInstrumentation> |
179 rendering_stats_instrumentation_owned); | 183 rendering_stats_instrumentation_owned); |
180 | 184 |
181 scoped_ptr<RenderingStatsInstrumentation> | 185 scoped_ptr<RenderingStatsInstrumentation> |
182 rendering_stats_instrumentation_owned_; | 186 rendering_stats_instrumentation_owned_; |
183 | 187 |
| 188 base::TimeDelta begin_main_frame_to_commit_duration_; |
| 189 base::TimeDelta commit_to_ready_to_activate_duration_; |
| 190 base::TimeDelta prepare_tiles_duration_; |
| 191 base::TimeDelta activate_duration_; |
184 base::TimeDelta draw_duration_; | 192 base::TimeDelta draw_duration_; |
185 base::TimeDelta begin_main_frame_to_commit_duration_; | |
186 base::TimeDelta commit_to_activate_duration_; | |
187 | 193 |
188 private: | 194 private: |
189 DISALLOW_COPY_AND_ASSIGN(FakeCompositorTimingHistory); | 195 DISALLOW_COPY_AND_ASSIGN(FakeCompositorTimingHistory); |
190 }; | 196 }; |
191 | 197 |
192 class TestScheduler : public Scheduler { | 198 class TestScheduler : public Scheduler { |
193 public: | 199 public: |
194 static scoped_ptr<TestScheduler> Create( | 200 static scoped_ptr<TestScheduler> Create( |
195 base::SimpleTestTickClock* now_src, | 201 base::SimpleTestTickClock* now_src, |
196 SchedulerClient* client, | 202 SchedulerClient* client, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 scoped_ptr<CompositorTimingHistory> compositor_timing_history); | 239 scoped_ptr<CompositorTimingHistory> compositor_timing_history); |
234 | 240 |
235 base::SimpleTestTickClock* now_src_; | 241 base::SimpleTestTickClock* now_src_; |
236 | 242 |
237 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 243 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
238 }; | 244 }; |
239 | 245 |
240 } // namespace cc | 246 } // namespace cc |
241 | 247 |
242 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 248 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |