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

Unified Diff: cc/scheduler/scheduler.cc

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: remove performance observer 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..04ba270ba9d8c0eada284b415702f5706810a40b 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -92,6 +92,14 @@ void Scheduler::SetCanDraw(bool can_draw) {
void Scheduler::NotifyReadyToActivate() {
compositor_timing_history_->ReadyToActivate();
state_machine_.NotifyReadyToActivate();
+ // Note the activate source-frame and timestamp
+ if (client_->SyncTreeSourceFrameNumber() != 0) {
+ ready_to_activate_source_frame_number_ =
+ client_->SyncTreeSourceFrameNumber();
brianderson 2017/03/30 18:32:03 If you store this information in the ProxyImpl, yo
panicker 2017/03/30 21:31:25 The reason I did this here as opposed to ProxyImpl
+ // ready_to_activate_time_ = base::TimeTicks::Now();
+ fprintf(stderr, "\n\t\tScheduler::NotifyReadyToActivate: ptree: %d",
+ ready_to_activate_source_frame_number_);
+ }
ProcessScheduledActions();
}
@@ -627,6 +635,10 @@ void Scheduler::ProcessScheduledActions() {
begin_main_frame_args_.frame_time);
state_machine_.WillSendBeginMainFrame();
// TODO(brianderson): Pass begin_main_frame_args_ directly to client.
+ // Add the args for activate.
+ begin_main_frame_args_.ready_to_activate_time = ready_to_activate_time_;
+ begin_main_frame_args_.ready_to_activate_source_frame_number =
+ ready_to_activate_source_frame_number_;
client_->ScheduledActionSendBeginMainFrame(begin_main_frame_args_);
break;
case SchedulerStateMachine::ACTION_COMMIT: {

Powered by Google App Engine
This is Rietveld 408576698