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

Side by Side Diff: cc/scheduler/scheduler_state_machine.cc

Issue 27200003: Trigger deadline immediately after an aborted main thread commit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/scheduler/scheduler_state_machine.h" 5 #include "cc/scheduler/scheduler_state_machine.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 << *AsValue(); 873 << *AsValue();
874 begin_frame_state_ = BEGIN_FRAME_STATE_IDLE; 874 begin_frame_state_ = BEGIN_FRAME_STATE_IDLE;
875 } 875 }
876 876
877 bool SchedulerStateMachine::ShouldTriggerBeginFrameDeadlineEarly() const { 877 bool SchedulerStateMachine::ShouldTriggerBeginFrameDeadlineEarly() const {
878 // If we are in the middle of the readback, we won't swap, so there is 878 // If we are in the middle of the readback, we won't swap, so there is
879 // no reason to trigger the deadline early. 879 // no reason to trigger the deadline early.
880 if (readback_state_ != READBACK_STATE_IDLE) 880 if (readback_state_ != READBACK_STATE_IDLE)
881 return false; 881 return false;
882 882
883 if (commit_state_ == COMMIT_STATE_IDLE && needs_redraw_)
brianderson 2013/10/15 10:00:23 Can you reorganize this method so that it checks t
884 return true;
885
883 // TODO(brianderson): This should take into account multiple commit sources. 886 // TODO(brianderson): This should take into account multiple commit sources.
884 return begin_frame_state_ == BEGIN_FRAME_STATE_INSIDE_BEGIN_FRAME && 887 return begin_frame_state_ == BEGIN_FRAME_STATE_INSIDE_BEGIN_FRAME &&
885 active_tree_needs_first_draw_; 888 active_tree_needs_first_draw_;
886 } 889 }
887 890
888 void SchedulerStateMachine::DidEnterPollForAnticipatedDrawTriggers() { 891 void SchedulerStateMachine::DidEnterPollForAnticipatedDrawTriggers() {
889 current_frame_number_++; 892 current_frame_number_++;
890 inside_poll_for_anticipated_draw_triggers_ = true; 893 inside_poll_for_anticipated_draw_triggers_ = true;
891 } 894 }
892 895
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 case OUTPUT_SURFACE_ACTIVE: 1006 case OUTPUT_SURFACE_ACTIVE:
1004 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: 1007 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT:
1005 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: 1008 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION:
1006 return true; 1009 return true;
1007 } 1010 }
1008 NOTREACHED(); 1011 NOTREACHED();
1009 return false; 1012 return false;
1010 } 1013 }
1011 1014
1012 } // namespace cc 1015 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698