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

Unified Diff: cc/scheduler/scheduler_state_machine.h

Issue 1002493006: cc: Do not use current frame number in state machine decisions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_begin_impl_frame_args_in_state_machine
Patch Set: 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
« no previous file with comments | « no previous file | cc/scheduler/scheduler_state_machine.cc » ('j') | cc/scheduler/scheduler_state_machine.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine.h
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
index f0851fc395d9e0d4fa218bf7d6d99d7736fae885..c1aa7a68d0157c7fad4e73354f7c75dc7c75fd52 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -282,10 +282,6 @@ class CC_EXPORT SchedulerStateMachine {
bool ShouldPrepareTiles() const;
void AdvanceCurrentFrameNumber();
- bool HasAnimatedThisFrame() const;
- bool HasSentBeginMainFrameThisFrame() const;
- bool HasRequestedSwapThisFrame() const;
- bool HasSwappedThisFrame() const;
void UpdateStateOnCommit(bool commit_had_no_updates);
void UpdateStateOnActivation();
@@ -299,6 +295,7 @@ class CC_EXPORT SchedulerStateMachine {
CommitState commit_state_;
ForcedRedrawOnTimeoutState forced_redraw_state_;
+ // These are used for tracing only.
int commit_count_;
int current_frame_number_;
int last_frame_number_animate_performed_;
@@ -306,6 +303,12 @@ class CC_EXPORT SchedulerStateMachine {
int last_frame_number_swap_requested_;
int last_frame_number_begin_main_frame_sent_;
+ // These are used to ensure that an action only happens once per frame,
+ // deadline, etc.
+ bool animate_funnel_;
brianderson 2015/03/19 23:31:43 animate_funnel_ can be reset in the middle of a fr
sunnyps 2015/03/20 01:13:44 We can change the names later - I wasn't able to c
+ bool perform_swap_funnel_;
+ bool request_swap_funnel_;
+ bool send_begin_main_frame_funnel_;
// prepare_tiles_funnel_ is "filled" each time PrepareTiles is called
// and "drained" on each BeginImplFrame. If the funnel gets too full,
// we start throttling ACTION_PREPARE_TILES such that we average one
@@ -325,7 +328,6 @@ class CC_EXPORT SchedulerStateMachine {
bool has_pending_tree_;
bool pending_tree_is_ready_for_activation_;
bool active_tree_needs_first_draw_;
- bool did_commit_after_animating_;
bool did_create_and_initialize_first_output_surface_;
bool impl_latency_takes_priority_;
bool skip_next_begin_main_frame_to_reduce_latency_;
« no previous file with comments | « no previous file | cc/scheduler/scheduler_state_machine.cc » ('j') | cc/scheduler/scheduler_state_machine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698