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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1976823002: cc: Remove throttling of main frames for preventing NPAPI deadlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698