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

Unified Diff: cc/scheduler/scheduler.cc

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: add baseline test in layer_tree_host_unittest_proxy; initialize source_frame_number is all ctors 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.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index d532ce3b07d7478d7eea238f0df43884f7d299e5..767802651b94b05c019cf4561ba8726e30997452 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -89,9 +89,14 @@ void Scheduler::SetCanDraw(bool can_draw) {
ProcessScheduledActions();
}
-void Scheduler::NotifyReadyToActivate() {
+void Scheduler::NotifyReadyToActivate(int source_frame_number) {
compositor_timing_history_->ReadyToActivate();
state_machine_.NotifyReadyToActivate();
+ // Note the activate source-frame and timestamp
+ if (source_frame_number != 0) {
+ ready_to_activate_time_.emplace_back(source_frame_number,
+ base::TimeTicks::Now());
+ }
ProcessScheduledActions();
}
@@ -608,7 +613,6 @@ void Scheduler::ProcessScheduledActions() {
// The top-level call will iteratively execute the next action for us anyway.
if (inside_process_scheduled_actions_)
return;
-
base::AutoReset<bool> mark_inside(&inside_process_scheduled_actions_, true);
SchedulerStateMachine::Action action;
@@ -627,6 +631,9 @@ void Scheduler::ProcessScheduledActions() {
begin_main_frame_args_.frame_time);
state_machine_.WillSendBeginMainFrame();
// TODO(brianderson): Pass begin_main_frame_args_ directly to client.
+ begin_main_frame_args_.ready_to_activate_time =
+ std::move(ready_to_activate_time_);
+ ready_to_activate_time_.clear();
client_->ScheduledActionSendBeginMainFrame(begin_main_frame_args_);
break;
case SchedulerStateMachine::ACTION_COMMIT: {

Powered by Google App Engine
This is Rietveld 408576698