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

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

Issue 1715863002: cc: Update main_thread_missed_last_deadline in aborted draws. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@abortIsSkip2
Patch Set: + active_tree_needs_first_draw_ = true Created 4 years, 10 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
« no previous file with comments | « no previous file | cc/scheduler/scheduler_unittest.cc » ('j') | 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/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_ACTIVATION) 636 if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_ACTIVATION)
637 forced_redraw_state_ = FORCED_REDRAW_STATE_WAITING_FOR_DRAW; 637 forced_redraw_state_ = FORCED_REDRAW_STATE_WAITING_FOR_DRAW;
638 638
639 has_pending_tree_ = false; 639 has_pending_tree_ = false;
640 pending_tree_is_ready_for_activation_ = false; 640 pending_tree_is_ready_for_activation_ = false;
641 active_tree_needs_first_draw_ = true; 641 active_tree_needs_first_draw_ = true;
642 needs_redraw_ = true; 642 needs_redraw_ = true;
643 } 643 }
644 644
645 void SchedulerStateMachine::WillDrawInternal() { 645 void SchedulerStateMachine::WillDrawInternal() {
646 // If a new active tree is pending after the one we are about to draw,
647 // the main thread is in a high latency mode.
648 // main_thread_missed_last_deadline_ is here in addition to
649 // OnBeginImplFrameIdle for cases where the scheduler aborts draws outside
650 // of the deadline.
651 main_thread_missed_last_deadline_ = CommitPending() || has_pending_tree_;
652
646 // We need to reset needs_redraw_ before we draw since the 653 // We need to reset needs_redraw_ before we draw since the
647 // draw itself might request another draw. 654 // draw itself might request another draw.
648 needs_redraw_ = false; 655 needs_redraw_ = false;
649 656
650 draw_funnel_ = true; 657 draw_funnel_ = true;
651 active_tree_needs_first_draw_ = false; 658 active_tree_needs_first_draw_ = false;
652 did_draw_in_last_frame_ = true; 659 did_draw_in_last_frame_ = true;
653 last_frame_number_draw_performed_ = current_frame_number_; 660 last_frame_number_draw_performed_ = current_frame_number_;
654 661
655 if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW) 662 if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW)
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 case OUTPUT_SURFACE_ACTIVE: 1143 case OUTPUT_SURFACE_ACTIVE:
1137 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: 1144 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT:
1138 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: 1145 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION:
1139 return true; 1146 return true;
1140 } 1147 }
1141 NOTREACHED(); 1148 NOTREACHED();
1142 return false; 1149 return false;
1143 } 1150 }
1144 1151
1145 } // namespace cc 1152 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698