| Index: cc/scheduler/scheduler.cc
|
| diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
|
| index 14d5e69e6a0b6521be64398bb0755aca1ce5e559..622b88524d0bd0559e6406a41ced1e3e479f7708 100644
|
| --- a/cc/scheduler/scheduler.cc
|
| +++ b/cc/scheduler/scheduler.cc
|
| @@ -396,6 +396,9 @@ void Scheduler::BeginImplFrameWithDeadline(const BeginFrameArgs& args) {
|
| return;
|
| }
|
|
|
| + state_machine_.SetBeginFrameAllowsLatencyOptimizations(
|
| + adjusted_args.allow_latency_optimizations);
|
| +
|
| BeginImplFrame(adjusted_args);
|
| }
|
|
|
| @@ -696,6 +699,10 @@ bool Scheduler::ShouldRecoverMainLatency(
|
| if (state_machine_.ImplLatencyTakesPriority())
|
| return false;
|
|
|
| + // If the args explicitly forbid it, we shouldn't skip BeginMainFrames.
|
| + if (!args.allow_latency_optimizations)
|
| + return false;
|
| +
|
| return can_activate_before_deadline;
|
| }
|
|
|
| @@ -719,6 +726,10 @@ bool Scheduler::ShouldRecoverImplLatency(
|
| if (!impl_thread_is_likely_high_latency)
|
| return false;
|
|
|
| + // If the args explicitly forbid it, we shouldn't skip BeginFrames.
|
| + if (!args.allow_latency_optimizations)
|
| + return false;
|
| +
|
| // The deadline may be in the past if our draw time is too long.
|
| bool can_draw_before_deadline = args.frame_time < args.deadline;
|
|
|
|
|