Revert of cc: SwapAck throttle Swap without throttling MainFrames...

Revert of cc: SwapAck throttle Swap without throttling MainFrames (https://codereview.chromium.org/222023010/)

Reason for revert:
[Sheriff] Speculative revert for breaking win7 dbg:

http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%284%29/builds/26034

Will reland if it didn't help.

Original issue's description:
> cc: SwapAck throttle Swap without throttling MainFrames
> 
> This should improve main thread throughput in cases
> where we are deferring the BeginMainFrame, but don't
> really need to because the swap ack will come back
> before the impl thread needs to draw anyway.
> 
> BUG=311213
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266685

NOTREECHECKS=true
NOTRY=true
BUG=311213
TBR=Sami, danakj, brianderson

Review URL: https://codereview.chromium.org/255033004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266757 0039d316-1c4b-4281-b951-d872f2087c98
parent 4c9b6c4b
...@@ -502,6 +502,11 @@ bool SchedulerStateMachine::ShouldSendBeginMainFrame() const { ...@@ -502,6 +502,11 @@ bool SchedulerStateMachine::ShouldSendBeginMainFrame() const {
if (!HasInitializedOutputSurface()) if (!HasInitializedOutputSurface())
return false; return false;
// SwapAck throttle the BeginMainFrames
// TODO(brianderson): Remove this restriction to improve throughput.
if (pending_swaps_ >= max_pending_swaps_)
return false;
if (skip_begin_main_frame_to_reduce_latency_) if (skip_begin_main_frame_to_reduce_latency_)
return false; return false;
......
...@@ -1266,11 +1266,10 @@ TEST(SchedulerTest, BeginRetroFrame_SwapThrottled) { ...@@ -1266,11 +1266,10 @@ TEST(SchedulerTest, BeginRetroFrame_SwapThrottled) {
client.Reset(); client.Reset();
// While swap throttled, BeginRetroFrames should trigger BeginImplFrames // While swap throttled, BeginRetroFrames should trigger BeginImplFrames
// and BeginMainFrames, but not draw. // but not a BeginMainFrame or draw.
scheduler->SetNeedsCommit(); scheduler->SetNeedsCommit();
client.task_runner().RunPendingTasks(); // Run posted BeginRetroFrame. client.task_runner().RunPendingTasks(); // Run posted BeginRetroFrame.
EXPECT_ACTION("WillBeginImplFrame", client, 0, 2); EXPECT_ACTION("WillBeginImplFrame", client, 0, 1);
EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client, 1, 2);
EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending()); EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
EXPECT_TRUE(client.needs_begin_frame()); EXPECT_TRUE(client.needs_begin_frame());
client.Reset(); client.Reset();
...@@ -1285,7 +1284,7 @@ TEST(SchedulerTest, BeginRetroFrame_SwapThrottled) { ...@@ -1285,7 +1284,7 @@ TEST(SchedulerTest, BeginRetroFrame_SwapThrottled) {
// Take us out of a swap throttled state. // Take us out of a swap throttled state.
scheduler->DidSwapBuffersComplete(); scheduler->DidSwapBuffersComplete();
EXPECT_EQ(0, client.num_actions_()); EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client, 0, 1);
EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending()); EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
EXPECT_TRUE(client.needs_begin_frame()); EXPECT_TRUE(client.needs_begin_frame());
client.Reset(); client.Reset();
...@@ -1442,19 +1441,18 @@ void BeginFramesNotFromClient_SwapThrottled(bool begin_frame_scheduling_enabled, ...@@ -1442,19 +1441,18 @@ void BeginFramesNotFromClient_SwapThrottled(bool begin_frame_scheduling_enabled,
EXPECT_FALSE(client.needs_begin_frame()); EXPECT_FALSE(client.needs_begin_frame());
client.Reset(); client.Reset();
// While swap throttled, BeginFrames should trigger BeginImplFrame and // While swap throttled, BeginFrames should trigger BeginImplFrames,
// BeginMainFrame, but not draw. // but not a BeginMainFrame or draw.
scheduler->SetNeedsCommit(); scheduler->SetNeedsCommit();
client.task_runner().RunPendingTasks(); // Run posted BeginFrame. client.task_runner().RunPendingTasks(); // Run posted BeginFrame.
EXPECT_ACTION("WillBeginImplFrame", client, 0, 2); EXPECT_ACTION("WillBeginImplFrame", client, 0, 1);
EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client, 1, 2);
EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending()); EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
EXPECT_FALSE(client.needs_begin_frame()); EXPECT_FALSE(client.needs_begin_frame());
client.Reset(); client.Reset();
// Take us out of a swap throttled state. // Take us out of a swap throttled state.
scheduler->DidSwapBuffersComplete(); scheduler->DidSwapBuffersComplete();
EXPECT_EQ(0, client.num_actions_()); EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client, 0, 1);
EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending()); EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
EXPECT_FALSE(client.needs_begin_frame()); EXPECT_FALSE(client.needs_begin_frame());
client.Reset(); client.Reset();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment