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

Unified Diff: cc/test/scheduler_test_common.cc

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.cc
diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc
index 31b0721b825c4c42f3f2d9f8dc80497b1d14583d..ab6b96fda9c7e79c61651c5bfdbe6a18f99d6380 100644
--- a/cc/test/scheduler_test_common.cc
+++ b/cc/test/scheduler_test_common.cc
@@ -117,12 +117,14 @@ TestScheduler::TestScheduler(
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)
: Scheduler(client,
scheduler_settings,
layer_tree_host_id,
test_task_runner,
external_begin_frame_source.Pass(),
+ rendering_stats_instrumentation,
frame_sources_constructor),
now_src_(now_src) {
}
@@ -131,6 +133,37 @@ base::TimeTicks TestScheduler::Now() const {
return now_src_->NowTicks();
}
+void TestScheduler::SetDrawDurationEstimate(base::TimeDelta duration) {
+ draw_duration_ = duration;
+}
+
+void TestScheduler::SetBeginMainFrameToCommitDurationEstimate(
+ base::TimeDelta duration) {
+ begin_main_frame_to_commit_duration_ = duration;
+}
+
+void TestScheduler::SetPrepareTilesToReadyToActivateDurationEstimate(
+ base::TimeDelta duration) {
+ commit_to_activate_duration_ = duration;
+}
+
+base::TimeDelta TestScheduler::BeginMainFrameToCommitDurationEstimate() const {
+ return begin_main_frame_to_commit_duration_;
+}
+
+base::TimeDelta TestScheduler::PrepareTilesToReadyToActivateDurationEstimate()
+ const {
+ return commit_to_activate_duration_;
+}
+
+base::TimeDelta TestScheduler::ActivateDurationEstimate() const {
+ return base::TimeDelta();
+}
+
+base::TimeDelta TestScheduler::DrawDurationEstimate() const {
+ return draw_duration_;
+}
+
TestScheduler::~TestScheduler() {
}

Powered by Google App Engine
This is Rietveld 408576698