Commit 989dd34c authored by James Wallace-Lee's avatar James Wallace-Lee Committed by Commit Bot

Don't set active_tree_needs_first_draw_ on invalidate

active_tree_needs_first_draw_ was set to false on invalidate so that it
wouldn't block commits. Instead, fallback tick handling guarantees that
every activated frame has a draw. This CL removes the change along with
its associated test (introduced in crrev.com/1092123005).

Bug: 819430
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ibf6008512638943b7caa771f7ca6a953851607d6
Reviewed-on: https://chromium-review.googlesource.com/953208Reviewed-by: default avatarSunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: James Wallace-Lee <jamwalla@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542216}
parent 3f7270c2
...@@ -910,11 +910,6 @@ void SchedulerStateMachine::WillInvalidateLayerTreeFrameSink() { ...@@ -910,11 +910,6 @@ void SchedulerStateMachine::WillInvalidateLayerTreeFrameSink() {
did_invalidate_layer_tree_frame_sink_ = true; did_invalidate_layer_tree_frame_sink_ = true;
last_frame_number_invalidate_layer_tree_frame_sink_performed_ = last_frame_number_invalidate_layer_tree_frame_sink_performed_ =
current_frame_number_; current_frame_number_;
// The synchronous compositor makes no guarantees about a draw coming in after
// an invalidate so clear any flags that would cause the compositor's pipeline
// to stall.
active_tree_needs_first_draw_ = false; // blocks commit if true
} }
void SchedulerStateMachine::SetSkipNextBeginMainFrameToReduceLatency( void SchedulerStateMachine::SetSkipNextBeginMainFrameToReduceLatency(
......
...@@ -3063,49 +3063,6 @@ TEST_F(SchedulerTest, SynchronousCompositorCommitAndVerifyBeginFrameAcks) { ...@@ -3063,49 +3063,6 @@ TEST_F(SchedulerTest, SynchronousCompositorCommitAndVerifyBeginFrameAcks) {
client_->Reset(); client_->Reset();
} }
TEST_F(SchedulerTest, SynchronousCompositorDoubleCommitWithoutDraw) {
scheduler_settings_.using_synchronous_renderer_compositor = true;
SetUpScheduler(EXTERNAL_BFS);
scheduler_->SetNeedsBeginMainFrame();
EXPECT_ACTIONS("AddObserver(this)");
client_->Reset();
// Next vsync.
AdvanceFrame();
EXPECT_ACTIONS("WillBeginImplFrame", "ScheduledActionSendBeginMainFrame");
EXPECT_FALSE(client_->IsInsideBeginImplFrame());
client_->Reset();
scheduler_->NotifyBeginMainFrameStarted(now_src()->NowTicks());
EXPECT_NO_ACTION();
scheduler_->NotifyReadyToCommit();
EXPECT_ACTIONS("ScheduledActionCommit");
client_->Reset();
scheduler_->NotifyReadyToActivate();
EXPECT_ACTIONS("ScheduledActionActivateSyncTree");
client_->Reset();
// Ask for another commit.
scheduler_->SetNeedsBeginMainFrame();
AdvanceFrame();
EXPECT_ACTIONS("WillBeginImplFrame", "ScheduledActionSendBeginMainFrame",
"ScheduledActionInvalidateLayerTreeFrameSink");
EXPECT_FALSE(client_->IsInsideBeginImplFrame());
client_->Reset();
scheduler_->NotifyBeginMainFrameStarted(now_src()->NowTicks());
EXPECT_NO_ACTION();
// Allow new commit even though previous commit hasn't been drawn.
scheduler_->NotifyReadyToCommit();
EXPECT_ACTIONS("ScheduledActionCommit");
client_->Reset();
}
class SchedulerClientSetNeedsPrepareTilesOnDraw : public FakeSchedulerClient { class SchedulerClientSetNeedsPrepareTilesOnDraw : public FakeSchedulerClient {
public: public:
SchedulerClientSetNeedsPrepareTilesOnDraw() : FakeSchedulerClient() {} SchedulerClientSetNeedsPrepareTilesOnDraw() : FakeSchedulerClient() {}
......
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