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

Unified Diff: cc/scheduler/scheduler_state_machine.h

Issue 2753843003: Create a new action triggered when a BeginMainFrame is not expected before vsync (Closed)
Patch Set: fix Sami's comments Created 3 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 side-by-side diff with in-line comments
Download patch
Index: cc/scheduler/scheduler_state_machine.h
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
index cd4a7f2ee6689c969354e511fad775a8980d3355..fee31caa64fe9c09c9615136fef0465de71c66c0 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -123,6 +123,7 @@ class CC_EXPORT SchedulerStateMachine {
ACTION_BEGIN_COMPOSITOR_FRAME_SINK_CREATION,
ACTION_PREPARE_TILES,
ACTION_INVALIDATE_COMPOSITOR_FRAME_SINK,
+ ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_SENT,
};
static const char* ActionToString(Action action);
@@ -131,6 +132,7 @@ class CC_EXPORT SchedulerStateMachine {
Action NextAction() const;
void WillSendBeginMainFrame();
+ void WillNotifyBeginMainFrameNotSent();
void WillCommit(bool commit_had_no_updates);
void WillActivate();
void WillDraw();
@@ -318,6 +320,7 @@ class CC_EXPORT SchedulerStateMachine {
bool ShouldCommit() const;
bool ShouldPrepareTiles() const;
bool ShouldInvalidateCompositorFrameSink() const;
+ bool ShouldNotifyBeginMainFrameNotSent() const;
void WillDrawInternal();
void WillPerformImplSideInvalidationInternal();
@@ -356,9 +359,11 @@ class CC_EXPORT SchedulerStateMachine {
// These are used to ensure that an action only happens once per frame,
// deadline, etc.
bool draw_funnel_;
- bool send_begin_main_frame_funnel_;
+ bool did_send_begin_main_frame_for_current_frame_;
sunnyps 2017/04/20 18:36:47 Thanks for changing this. I was planning to do the
Dan Elphick 2017/04/26 16:31:44 Acknowledged.
bool invalidate_compositor_frame_sink_funnel_;
bool impl_side_invalidation_funnel_;
+ bool did_notify_begin_main_frame_not_sent_;
+ bool did_commit_during_frame_;
// 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

Powered by Google App Engine
This is Rietveld 408576698