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

Unified Diff: cc/scheduler/scheduler.cc

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: pass 0 for sync tree in NotifyReadyToActivate from SingleThreadProxy 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..de4dada566e86ddcafb844f335594ef45d6c44c5 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -89,9 +89,17 @@ void Scheduler::SetCanDraw(bool can_draw) {
ProcessScheduledActions();
}
-void Scheduler::NotifyReadyToActivate() {
+void Scheduler::NotifyReadyToActivate(int sync_tree) {
compositor_timing_history_->ReadyToActivate();
state_machine_.NotifyReadyToActivate();
+ // Note the activate source-frame and timestamp
+ if (sync_tree != 0) {
+ ready_to_activate_time_.emplace_back(
+ std::make_pair(sync_tree, base::TimeTicks::Now()));
brianderson 2017/04/10 23:12:47 I was under the impression you might be able to re
panicker 2017/04/11 22:19:37 Good catch, done.
+ /* TODO: REMOVE ME */
+ fprintf(stderr, "\n\t\tScheduler::NotifyReadyToActivate: synctree: %d",
+ sync_tree);
+ }
ProcessScheduledActions();
}
@@ -627,6 +635,8 @@ 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_);
brianderson 2017/04/10 23:12:47 After the move, ready_to_activate_time_ is in an v
panicker 2017/04/11 22:19:37 Done.
client_->ScheduledActionSendBeginMainFrame(begin_main_frame_args_);
break;
case SchedulerStateMachine::ACTION_COMMIT: {
« cc/scheduler/scheduler.h ('K') | « cc/scheduler/scheduler.h ('k') | cc/trees/proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698