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

Unified Diff: cc/scheduler/scheduler.cc

Issue 2753843003: Create a new action triggered when a BeginMainFrame is not expected before vsync (Closed)
Patch Set: missed one 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.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 4cffcd58a1674da8534ca93c61c720c7e526f47b..f2b4d2a13b58e59bc07dbdb582783c187c01ec12 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -215,6 +215,13 @@ base::TimeTicks Scheduler::LastBeginImplFrameTime() {
return begin_impl_frame_tracker_.Current().frame_time;
}
+void Scheduler::ScheduleShortIdleWork(const BeginFrameArgs& args) {
+ // TODO(delphick): Do we need to log this?
+ compositor_timing_history_->BeginImplFrameNotExpectedSoon();
+
+ client_->ScheduledActionDoShortIdleWork(args);
+}
+
void Scheduler::BeginImplFrameNotExpectedSoon() {
compositor_timing_history_->BeginImplFrameNotExpectedSoon();
@@ -629,6 +636,10 @@ void Scheduler::ProcessScheduledActions() {
// TODO(brianderson): Pass begin_main_frame_args_ directly to client.
client_->ScheduledActionSendBeginMainFrame(begin_main_frame_args_);
break;
+ case SchedulerStateMachine::ACTION_DO_SHORT_IDLE_WORK:
+ state_machine_.WillDoShortIdleWork();
+ ScheduleShortIdleWork(begin_main_frame_args_);
+ break;
case SchedulerStateMachine::ACTION_COMMIT: {
bool commit_has_no_updates = false;
state_machine_.WillCommit(commit_has_no_updates);

Powered by Google App Engine
This is Rietveld 408576698