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

Unified Diff: cc/scheduler/scheduler_unittest.cc

Issue 292533002: Remove forced commit and readback from the scheduler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-cnr-scheduler: moretest Created 6 years, 7 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') | cc/trees/thread_proxy.h » ('j') | 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 c3d9f3854adf07505767acc3d2f4941b823d6bb0..071fa58a066aea14ff4c3158d3ab47dac747b187 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -134,11 +134,6 @@ class FakeSchedulerClient : public SchedulerClient {
states_.push_back(scheduler_->AsValue().release());
return DRAW_SUCCESS;
}
- virtual DrawResult ScheduledActionDrawAndReadback() OVERRIDE {
- actions_.push_back("ScheduledActionDrawAndReadback");
- states_.push_back(scheduler_->AsValue().release());
- return DRAW_SUCCESS;
- }
virtual void ScheduledActionCommit() OVERRIDE {
actions_.push_back("ScheduledActionCommit");
states_.push_back(scheduler_->AsValue().release());
@@ -645,53 +640,6 @@ TEST(SchedulerTest, NoSwapWhenDrawFails) {
EXPECT_EQ(2, client.num_draws());
}
-TEST(SchedulerTest, NoSwapWhenSwapFailsDuringForcedCommit) {
- FakeSchedulerClient client;
- SchedulerSettings default_scheduler_settings;
- Scheduler* scheduler = client.CreateScheduler(default_scheduler_settings);
-
- // Tell the client that it will fail to swap.
- client.SetDrawWillHappen(true);
- client.SetSwapWillHappenIfDrawHappens(false);
-
- // Get the compositor to do a ScheduledActionDrawAndReadback.
- scheduler->SetCanDraw(true);
- scheduler->SetNeedsRedraw();
- scheduler->SetNeedsForcedCommitForReadback();
- scheduler->NotifyBeginMainFrameStarted();
- scheduler->NotifyReadyToCommit();
- EXPECT_TRUE(client.HasAction("ScheduledActionDrawAndReadback"));
-}
-
-TEST(SchedulerTest, BackToBackReadbackAllowed) {
- // Some clients call readbacks twice in a row before the replacement
- // commit comes in. Make sure it is allowed.
- FakeSchedulerClient client;
- SchedulerSettings default_scheduler_settings;
- Scheduler* scheduler = client.CreateScheduler(default_scheduler_settings);
-
- // Get the compositor to do 2 ScheduledActionDrawAndReadbacks before
- // the replacement commit comes in.
- scheduler->SetCanDraw(true);
- scheduler->SetNeedsRedraw();
- scheduler->SetNeedsForcedCommitForReadback();
- scheduler->NotifyBeginMainFrameStarted();
- scheduler->NotifyReadyToCommit();
- EXPECT_TRUE(client.HasAction("ScheduledActionDrawAndReadback"));
-
- client.Reset();
- scheduler->SetNeedsForcedCommitForReadback();
- scheduler->NotifyBeginMainFrameStarted();
- scheduler->NotifyReadyToCommit();
- EXPECT_TRUE(client.HasAction("ScheduledActionDrawAndReadback"));
-
- // The replacement commit comes in after 2 readbacks.
- client.Reset();
- scheduler->NotifyBeginMainFrameStarted();
- scheduler->NotifyReadyToCommit();
-}
-
-
class SchedulerClientNeedsManageTilesInDraw : public FakeSchedulerClient {
public:
virtual DrawResult ScheduledActionDrawAndSwapIfPossible()
« no previous file with comments | « cc/scheduler/scheduler_state_machine_unittest.cc ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698