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

Unified Diff: cc/test/scheduler_test_common.cc

Issue 1133673004: cc: Heuristic for Renderer latency recovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove active_tree_needs_first_draw condidtion Created 5 years, 5 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
« cc/scheduler/scheduler_unittest.cc ('K') | « cc/test/scheduler_test_common.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/scheduler_test_common.cc
diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc
index 91d0952922aab2ded73b50dcc3f958d3271ac66f..294b9517435504b6bfa56811cda3443ee2d5578d 100644
--- a/cc/test/scheduler_test_common.cc
+++ b/cc/test/scheduler_test_common.cc
@@ -83,6 +83,14 @@ FakeCompositorTimingHistory::FakeCompositorTimingHistory(
FakeCompositorTimingHistory::~FakeCompositorTimingHistory() {
}
+void FakeCompositorTimingHistory::SetAllEstimatesTo(base::TimeDelta duration) {
+ begin_main_frame_to_commit_duration_ = duration;
+ commit_to_ready_to_activate_duration_ = duration;
+ prepare_tiles_duration_ = duration;
+ activate_duration_ = duration;
+ draw_duration_ = duration;
+}
+
void FakeCompositorTimingHistory::SetBeginMainFrameToCommitDurationEstimate(
base::TimeDelta duration) {
begin_main_frame_to_commit_duration_ = duration;
@@ -170,13 +178,19 @@ TestScheduler::TestScheduler(
synthetic_frame_source.Pass(),
unthrottled_frame_source.Pass(),
compositor_timing_history.Pass()),
- now_src_(now_src) {
+ now_src_(now_src),
+ was_swap_throttled_at_last_begin_frame_(false) {
}
base::TimeTicks TestScheduler::Now() const {
return now_src_->NowTicks();
}
+void TestScheduler::BeginImplFrameWithDeadline(const BeginFrameArgs& args) {
+ was_swap_throttled_at_last_begin_frame_ = state_machine_.SwapThrottled();
sunnyps 2015/07/09 23:44:30 I think a better way to do this is to hook up Fake
brianderson 2015/07/10 00:34:08 I wanted to use FakeSchedulerClient::WillBeginImpl
+ Scheduler::BeginImplFrameWithDeadline(args);
+}
+
TestScheduler::~TestScheduler() {
}
« cc/scheduler/scheduler_unittest.cc ('K') | « cc/test/scheduler_test_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698