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

Unified Diff: cc/scheduler/scheduler_unittest.cc

Issue 1087983003: Revert of Remove swap ack throttling to regain performance regression on freon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « cc/scheduler/scheduler_state_machine_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_unittest.cc
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index ec5e1f03c7f05629d8de47c57b094cb464703cfd..52f7c4633b336f752804ee6f70ed98a6f8274725 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -1494,14 +1494,13 @@
client_->Reset();
// While swap throttled, BeginRetroFrames should trigger BeginImplFrames
- // and BeginMainFrame.
+ // but not a BeginMainFrame or draw.
scheduler_->SetNeedsCommit();
scheduler_->SetNeedsRedraw();
// Run posted BeginRetroFrame.
task_runner().RunTasksWhile(client_->ImplFrameDeadlinePending(false));
- EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3);
- EXPECT_ACTION("ScheduledActionAnimate", client_, 1, 3);
- EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client_, 2, 3);
+ EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2);
+ EXPECT_ACTION("ScheduledActionAnimate", client_, 1, 2);
EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
EXPECT_TRUE(client_->needs_begin_frames());
client_->Reset();
@@ -1515,7 +1514,7 @@
// Take us out of a swap throttled state.
scheduler_->DidSwapBuffersComplete();
- EXPECT_NO_ACTION(client_);
+ EXPECT_SINGLE_ACTION("ScheduledActionSendBeginMainFrame", client_);
EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
EXPECT_TRUE(client_->needs_begin_frames());
client_->Reset();
@@ -1761,14 +1760,13 @@
EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending());
client_->Reset();
- // While swap throttled, BeginFrames should trigger BeginImplFrames
- // and BeginMainFrame.
+ // While swap throttled, BeginFrames should trigger BeginImplFrames,
+ // but not a BeginMainFrame or draw.
scheduler_->SetNeedsCommit();
scheduler_->SetNeedsRedraw();
EXPECT_SCOPED(AdvanceFrame()); // Run posted BeginFrame.
- EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3);
- EXPECT_ACTION("ScheduledActionAnimate", client_, 1, 3);
- EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client_, 2, 3);
+ EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2);
+ EXPECT_ACTION("ScheduledActionAnimate", client_, 1, 2);
EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
client_->Reset();
@@ -1781,7 +1779,7 @@
// Take us out of a swap throttled state.
scheduler_->DidSwapBuffersComplete();
- EXPECT_NO_ACTION(client_);
+ EXPECT_SINGLE_ACTION("ScheduledActionSendBeginMainFrame", client_);
EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
client_->Reset();
« no previous file with comments | « cc/scheduler/scheduler_state_machine_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698