Index: cc/test/scheduler_test_common.h |
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h |
index f9ca3ae524cd7484a89feef69037d94d28483237..749eed50295d83c9c05870905c2396fb130eab0c 100644 |
--- a/cc/test/scheduler_test_common.h |
+++ b/cc/test/scheduler_test_common.h |
@@ -17,6 +17,8 @@ |
namespace cc { |
+class RenderingStatsInstrumentation; |
+ |
class FakeTimeSourceClient : public TimeSourceClient { |
public: |
FakeTimeSourceClient() : tick_called_(false) {} |
@@ -163,17 +165,14 @@ class TestScheduler : public Scheduler { |
const SchedulerSettings& scheduler_settings, |
int layer_tree_host_id, |
const scoped_refptr<OrderedSimpleTaskRunner>& task_runner, |
- scoped_ptr<BeginFrameSource> external_begin_frame_source) { |
+ scoped_ptr<BeginFrameSource> external_begin_frame_source, |
+ RenderingStatsInstrumentation* rendering_stats_instrumentation) { |
TestSchedulerFrameSourcesConstructor frame_sources_constructor( |
task_runner.get(), now_src); |
return make_scoped_ptr(new TestScheduler( |
- now_src, |
- client, |
- scheduler_settings, |
- layer_tree_host_id, |
- task_runner, |
- &frame_sources_constructor, |
- external_begin_frame_source.Pass())); |
+ now_src, client, scheduler_settings, layer_tree_host_id, task_runner, |
+ &frame_sources_constructor, external_begin_frame_source.Pass(), |
+ rendering_stats_instrumentation)); |
} |
// Extra test helper functionality |
@@ -188,17 +187,21 @@ class TestScheduler : public Scheduler { |
~TestScheduler() override; |
- void NotifyReadyToCommitThenActivateIfNeeded() { |
- NotifyReadyToCommit(); |
- if (settings_.impl_side_painting) { |
- NotifyReadyToActivate(); |
- } |
- } |
- |
base::TimeDelta BeginImplFrameInterval() { |
return begin_impl_frame_tracker_.Interval(); |
} |
+ void SetDrawDurationEstimate(base::TimeDelta duration); |
+ void SetBeginMainFrameToCommitDurationEstimate(base::TimeDelta duration); |
+ void SetPrepareTilesToReadyToActivateDurationEstimate( |
+ base::TimeDelta duration); |
+ |
+ base::TimeDelta BeginMainFrameToCommitDurationEstimate() const override; |
+ base::TimeDelta PrepareTilesToReadyToActivateDurationEstimate() |
+ const override; |
+ base::TimeDelta ActivateDurationEstimate() const override; |
+ base::TimeDelta DrawDurationEstimate() const override; |
+ |
protected: |
// Overridden from Scheduler. |
base::TimeTicks Now() const override; |
@@ -210,10 +213,15 @@ class TestScheduler : public Scheduler { |
int layer_tree_host_id, |
const scoped_refptr<OrderedSimpleTaskRunner>& test_task_runner, |
TestSchedulerFrameSourcesConstructor* frame_sources_constructor, |
- scoped_ptr<BeginFrameSource> external_begin_frame_source); |
+ scoped_ptr<BeginFrameSource> external_begin_frame_source, |
+ RenderingStatsInstrumentation* rendering_stats_instrumentation); |
// Not owned. |
base::SimpleTestTickClock* now_src_; |
+ |
+ base::TimeDelta draw_duration_; |
+ base::TimeDelta begin_main_frame_to_commit_duration_; |
+ base::TimeDelta commit_to_activate_duration_; |
}; |
} // namespace cc |