Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Unified Diff: cc/test/scheduler_test_common.h

Issue 1192663005: cc: Measure compositor timing with finer granularity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@modeTimingHistory3
Patch Set: fixes Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698