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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 987563002: cc: Simplify SetNeedsBeginFrames code in scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_retro_frame
Patch Set: Address comments. Created 5 years, 9 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
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index f2f6636a277d960e9bc9b7d04da2863b04cf25ed..cb5399749053e5c32ee19c1e275786b0db4a71b4 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -720,29 +720,6 @@ bool SchedulerStateMachine::BeginFrameNeeded() const {
return BeginFrameNeededToAnimateOrDraw();
}
-bool SchedulerStateMachine::ShouldSetNeedsBeginFrames(
- bool frame_source_needs_begin_frames) const {
- bool needs_begin_frame = BeginFrameNeeded();
-
- // Never call SetNeedsBeginFrames if the frame source has the right value.
- if (needs_begin_frame == frame_source_needs_begin_frames)
- return false;
-
- // Always request the BeginFrame immediately if it's needed.
- if (needs_begin_frame)
- return true;
-
- // Stop requesting BeginFrames after a deadline.
- if (begin_impl_frame_state_ == BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE)
- return true;
-
- // Stop requesting BeginFrames immediately when output surface is lost.
- if (!HasInitializedOutputSurface())
- return true;
-
- return false;
-}
-
bool SchedulerStateMachine::ShouldPollForAnticipatedDrawTriggers() const {
// ShouldPollForAnticipatedDrawTriggers is what we use in place of
// ProactiveBeginFrameWanted when we are using the synchronous

Powered by Google App Engine
This is Rietveld 408576698