| Index: cc/scheduler/scheduler_state_machine.cc
|
| diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
|
| index 5d6f5895f34931adae9d37191f34e75f0e6fa6fd..ed2cb7a393370c22e4abe3cee2090561b7eafbbe 100644
|
| --- a/cc/scheduler/scheduler_state_machine.cc
|
| +++ b/cc/scheduler/scheduler_state_machine.cc
|
| @@ -411,18 +411,6 @@ bool SchedulerStateMachine::CouldSendBeginMainFrame() const {
|
| return true;
|
| }
|
|
|
| -bool SchedulerStateMachine::SendingBeginMainFrameMightCauseDeadlock() const {
|
| - // NPAPI is the only case where the UI thread makes synchronous calls to the
|
| - // Renderer main thread. During that synchronous call, we may not get a
|
| - // SwapAck for the UI thread, which may prevent BeginMainFrame's from
|
| - // completing if there's enough back pressure. If the BeginMainFrame can't
|
| - // make progress, the Renderer can't service the UI thread's synchronous call
|
| - // and we have deadlock.
|
| - // This returns true if there's too much backpressure to finish a commit
|
| - // if we were to initiate a BeginMainFrame.
|
| - return has_pending_tree_ && active_tree_needs_first_draw_ && SwapThrottled();
|
| -}
|
| -
|
| bool SchedulerStateMachine::ShouldSendBeginMainFrame() const {
|
| if (!CouldSendBeginMainFrame())
|
| return false;
|
| @@ -459,9 +447,6 @@ bool SchedulerStateMachine::ShouldSendBeginMainFrame() const {
|
|
|
| // We need a new commit for the forced redraw. This honors the
|
| // single commit per interval because the result will be swapped to screen.
|
| - // TODO(brianderson): Remove this or move it below the
|
| - // SendingBeginMainFrameMightCauseDeadlock check since we want to avoid
|
| - // ever returning true from this method if we might cause deadlock.
|
| if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_COMMIT)
|
| return true;
|
|
|
| @@ -469,10 +454,6 @@ bool SchedulerStateMachine::ShouldSendBeginMainFrame() const {
|
| if (!HasInitializedOutputSurface())
|
| return false;
|
|
|
| - // Make sure the BeginMainFrame can finish eventually if we start it.
|
| - if (SendingBeginMainFrameMightCauseDeadlock())
|
| - return false;
|
| -
|
| if (!settings_.main_frame_while_swap_throttled_enabled) {
|
| // SwapAck throttle the BeginMainFrames unless we just swapped to
|
| // potentially improve impl-thread latency over main-thread throughput.
|
|
|