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