 Chromium Code Reviews
 Chromium Code Reviews Issue 27200003:
  Trigger deadline immediately after an aborted main thread commit  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 27200003:
  Trigger deadline immediately after an aborted main thread commit  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| Index: cc/scheduler/scheduler_state_machine.cc | 
| diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc | 
| index 641c80b012510c4162021f89ca68dae99ecec69a..c96e8613944f5f1d3a9776cf5d9ff569be1bd96a 100644 | 
| --- a/cc/scheduler/scheduler_state_machine.cc | 
| +++ b/cc/scheduler/scheduler_state_machine.cc | 
| @@ -881,8 +881,19 @@ bool SchedulerStateMachine::ShouldTriggerBeginFrameDeadlineEarly() const { | 
| return false; | 
| // TODO(brianderson): This should take into account multiple commit sources. | 
| - return begin_frame_state_ == BEGIN_FRAME_STATE_INSIDE_BEGIN_FRAME && | 
| - active_tree_needs_first_draw_; | 
| + if (begin_frame_state_ == BEGIN_FRAME_STATE_INSIDE_BEGIN_FRAME && | 
| + active_tree_needs_first_draw_) | 
| + return true; | 
| 
brianderson
2013/10/15 15:02:32
Sorry, I meant to split this into two conditions:
 
Sami
2013/10/15 15:12:51
Done.
 | 
| + | 
| + // This is used to prioritize impl-thread draws when the main thread isn't | 
| + // producing anything, e.g., after an aborted commit. We also check that we | 
| + // don't have a pending tree -- otherwise we should give it a chance to | 
| + // activate. | 
| + // TODO(skyostil): Revisit this when we have more accurate deadline estimates. | 
| + if (commit_state_ == COMMIT_STATE_IDLE && needs_redraw_ && !has_pending_tree_) | 
| + return true; | 
| + | 
| + return false; | 
| } | 
| void SchedulerStateMachine::DidEnterPollForAnticipatedDrawTriggers() { |