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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1691153002: cc: Consider main thread making deadline upon abort. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reorder expectations 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 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 17d4ff601c21bac350273c053069ec9d54cff222..b168034c3bb632006ca90dd6c572cb80ca2f67bf 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -953,10 +953,6 @@ bool SchedulerStateMachine::ShouldTriggerBeginImplFrameDeadlineImmediately()
return false;
}
-bool SchedulerStateMachine::main_thread_missed_last_deadline() const {
- return main_thread_missed_last_deadline_;
-}
-
bool SchedulerStateMachine::SwapThrottled() const {
return pending_swaps_ >= kMaxPendingSwaps;
}
@@ -1068,6 +1064,11 @@ void SchedulerStateMachine::NotifyReadyToCommit() {
void SchedulerStateMachine::BeginMainFrameAborted(CommitEarlyOutReason reason) {
DCHECK_EQ(begin_main_frame_state_, BEGIN_MAIN_FRAME_STATE_STARTED);
+
+ // If the main thread aborted, it doesn't matter if the main thread missed
+ // the last deadline since it didn't have an update anyway.
+ main_thread_missed_last_deadline_ = false;
+
switch (reason) {
case CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST:
case CommitEarlyOutReason::ABORTED_NOT_VISIBLE:
« 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