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

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

Issue 1904333002: cc: Remove unnecessary state from scheduler state machine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_state_machine.h » ('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.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } else if (ShouldRecoverImplLatency(adjusted_args, 477 } else if (ShouldRecoverImplLatency(adjusted_args,
478 can_activate_before_deadline)) { 478 can_activate_before_deadline)) {
479 TRACE_EVENT_INSTANT0("cc", "SkipBeginImplFrameToReduceLatency", 479 TRACE_EVENT_INSTANT0("cc", "SkipBeginImplFrameToReduceLatency",
480 TRACE_EVENT_SCOPE_THREAD); 480 TRACE_EVENT_SCOPE_THREAD);
481 if (begin_frame_source_) 481 if (begin_frame_source_)
482 begin_frame_source_->DidFinishFrame(begin_retro_frame_args_.size()); 482 begin_frame_source_->DidFinishFrame(begin_retro_frame_args_.size());
483 return; 483 return;
484 } 484 }
485 485
486 BeginImplFrame(adjusted_args); 486 BeginImplFrame(adjusted_args);
487
488 // The deadline will be scheduled in ProcessScheduledActions.
489 state_machine_.OnBeginImplFrameDeadlinePending();
490 ProcessScheduledActions();
491 } 487 }
492 488
493 void Scheduler::BeginImplFrameSynchronous(const BeginFrameArgs& args) { 489 void Scheduler::BeginImplFrameSynchronous(const BeginFrameArgs& args) {
494 TRACE_EVENT1("cc,benchmark", "Scheduler::BeginImplFrame", "args", 490 TRACE_EVENT1("cc,benchmark", "Scheduler::BeginImplFrame", "args",
495 args.AsValue()); 491 args.AsValue());
496 492
497 // The main thread currently can't commit before we draw with the 493 // The main thread currently can't commit before we draw with the
498 // synchronous compositor, so never consider the BeginMainFrame fast. 494 // synchronous compositor, so never consider the BeginMainFrame fast.
499 state_machine_.SetCriticalBeginMainFrameToActivateIsFast(false); 495 state_machine_.SetCriticalBeginMainFrameToActivateIsFast(false);
500 begin_main_frame_args_ = args; 496 begin_main_frame_args_ = args;
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 } 865 }
870 866
871 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 867 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
872 return (state_machine_.begin_main_frame_state() == 868 return (state_machine_.begin_main_frame_state() ==
873 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || 869 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT ||
874 state_machine_.begin_main_frame_state() == 870 state_machine_.begin_main_frame_state() ==
875 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); 871 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED);
876 } 872 }
877 873
878 } // namespace cc 874 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler_state_machine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698