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

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: Never schedule idle work if we're already scheduling a main frame Created 3 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.h
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
index cd4a7f2ee6689c969354e511fad775a8980d3355..79cf904677f726969cf59d3febdf2e2b0f43382e 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_DO_IDLE_WORK,
};
static const char* ActionToString(Action action);
@@ -131,6 +132,7 @@ class CC_EXPORT SchedulerStateMachine {
Action NextAction() const;
void WillSendBeginMainFrame();
+ void WillDoIdleWork();
void WillCommit(bool commit_had_no_updates);
void WillActivate();
void WillDraw();
@@ -274,6 +276,7 @@ class CC_EXPORT SchedulerStateMachine {
bool PendingDrawsShouldBeAborted() const;
bool CouldSendBeginMainFrame() const;
+ bool CouldDoIdleWork() const;
void SetDeferCommits(bool defer_commits);
@@ -318,6 +321,7 @@ class CC_EXPORT SchedulerStateMachine {
bool ShouldCommit() const;
bool ShouldPrepareTiles() const;
bool ShouldInvalidateCompositorFrameSink() const;
+ bool ShouldDoIdleWork() const;
void WillDrawInternal();
void WillPerformImplSideInvalidationInternal();
@@ -359,6 +363,7 @@ class CC_EXPORT SchedulerStateMachine {
bool send_begin_main_frame_funnel_;
bool invalidate_compositor_frame_sink_funnel_;
bool impl_side_invalidation_funnel_;
+ bool do_idle_work_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

Powered by Google App Engine
This is Rietveld 408576698