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

Unified Diff: cc/scheduler/scheduler.cc

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: add a vector instead of single activate frame time 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..c7b35e85346af5dc74d7030f66d4a35564c7ddc1 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -92,6 +92,13 @@ 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_time_.push_back(std::make_pair(
brianderson 2017/04/06 23:43:15 emplace_back?
panicker 2017/04/08 00:29:06 Done.
+ client_->SyncTreeSourceFrameNumber(), base::TimeTicks::Now()));
+ fprintf(stderr, "\n\t\tScheduler::NotifyReadyToActivate: ptree: %d",
vmpstr 2017/04/05 19:11:33 this is just for debugging I assume?
panicker 2017/04/08 00:29:06 Yes I plan to clean these up before submitting
+ client_->SyncTreeSourceFrameNumber());
+ }
ProcessScheduledActions();
}
@@ -627,6 +634,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 = ready_to_activate_time_;
vmpstr 2017/04/05 19:11:33 std::move
panicker 2017/04/08 00:29:06 Done.
+ 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