| Index: cc/scheduler/scheduler.cc
|
| diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
|
| index d7d2e8ca6fb2ba6c2adc28c9bd06d25bcb8cc981..0e1b34e39ad9a95c470174dfe2b828953c787b0f 100644
|
| --- a/cc/scheduler/scheduler.cc
|
| +++ b/cc/scheduler/scheduler.cc
|
| @@ -409,20 +409,19 @@ void Scheduler::BeginImplFrameWithDeadline(const BeginFrameArgs& args) {
|
| return;
|
| }
|
|
|
| - BeginImplFrame(adjusted_args);
|
| + BeginImplFrame(adjusted_args, now);
|
| }
|
|
|
| void Scheduler::BeginImplFrameSynchronous(const BeginFrameArgs& args) {
|
| TRACE_EVENT1("cc,benchmark", "Scheduler::BeginImplFrame", "args",
|
| args.AsValue());
|
| -
|
| // The main thread currently can't commit before we draw with the
|
| // synchronous compositor, so never consider the BeginMainFrame fast.
|
| state_machine_.SetCriticalBeginMainFrameToActivateIsFast(false);
|
| begin_main_frame_args_ = args;
|
| begin_main_frame_args_.on_critical_path = !ImplLatencyTakesPriority();
|
|
|
| - BeginImplFrame(args);
|
| + BeginImplFrame(args, Now());
|
| compositor_timing_history_->WillFinishImplFrame(
|
| state_machine_.needs_redraw());
|
| FinishImplFrame();
|
| @@ -463,7 +462,8 @@ void Scheduler::SendBeginFrameAck(const BeginFrameArgs& args,
|
| // BeginImplFrame starts a compositor frame that will wait up until a deadline
|
| // for a BeginMainFrame+activation to complete before it times out and draws
|
| // any asynchronous animation and scroll/pinch updates.
|
| -void Scheduler::BeginImplFrame(const BeginFrameArgs& args) {
|
| +void Scheduler::BeginImplFrame(const BeginFrameArgs& args,
|
| + base::TimeTicks now) {
|
| DCHECK_EQ(state_machine_.begin_impl_frame_state(),
|
| SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE);
|
| DCHECK(begin_impl_frame_deadline_task_.IsCancelled());
|
| @@ -473,7 +473,7 @@ void Scheduler::BeginImplFrame(const BeginFrameArgs& args) {
|
| state_machine_.OnBeginImplFrame(args.source_id, args.sequence_number);
|
| devtools_instrumentation::DidBeginFrame(layer_tree_host_id_);
|
| compositor_timing_history_->WillBeginImplFrame(
|
| - state_machine_.NewActiveTreeLikely());
|
| + state_machine_.NewActiveTreeLikely(), args.frame_time, args.type, now);
|
| client_->WillBeginImplFrame(begin_impl_frame_tracker_.Current());
|
|
|
| ProcessScheduledActions();
|
| @@ -624,8 +624,7 @@ void Scheduler::ProcessScheduledActions() {
|
| case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME:
|
| compositor_timing_history_->WillBeginMainFrame(
|
| begin_main_frame_args_.on_critical_path,
|
| - begin_main_frame_args_.frame_time,
|
| - begin_main_frame_args_.type);
|
| + begin_main_frame_args_.frame_time);
|
| state_machine_.WillSendBeginMainFrame();
|
| // TODO(brianderson): Pass begin_main_frame_args_ directly to client.
|
| client_->ScheduledActionSendBeginMainFrame(begin_main_frame_args_);
|
|
|