| Index: cc/output/output_surface.cc
|
| diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
|
| index 9d234e5229a18ccb1b1ee35e0baa91bb147a1f2b..b56ef77e68b43101a79baeefcbf70f18c5a1a509 100644
|
| --- a/cc/output/output_surface.cc
|
| +++ b/cc/output/output_surface.cc
|
| @@ -104,6 +104,9 @@ void OutputSurface::InitializeBeginFrameEmulation(
|
|
|
| frame_rate_controller_->SetClient(this);
|
| frame_rate_controller_->SetMaxSwapsPending(max_frames_pending_);
|
| + frame_rate_controller_->SetDeadlineAdjustment(
|
| + capabilities_.has_parent_compositor ?
|
| + BeginFrameArgs::DefaultDeadlineAdjustment() : base::TimeDelta());
|
|
|
| // The new frame rate controller will consume the swap acks of the old
|
| // frame rate controller, so we set that expectation up here.
|
| @@ -126,10 +129,11 @@ void OutputSurface::OnVSyncParametersChanged(base::TimeTicks timebase,
|
| frame_rate_controller_->SetTimebaseAndInterval(timebase, interval);
|
| }
|
|
|
| -void OutputSurface::FrameRateControllerTick(bool throttled) {
|
| +void OutputSurface::FrameRateControllerTick(bool throttled,
|
| + BeginFrameArgs args) {
|
| DCHECK(frame_rate_controller_);
|
| if (!throttled)
|
| - BeginFrame(frame_rate_controller_->LastTickTime());
|
| + BeginFrame(args);
|
| }
|
|
|
| // Forwarded to OutputSurfaceClient
|
| @@ -145,14 +149,14 @@ void OutputSurface::SetNeedsBeginFrame(bool enable) {
|
| frame_rate_controller_->SetActive(enable);
|
| }
|
|
|
| -void OutputSurface::BeginFrame(base::TimeTicks frame_time) {
|
| +void OutputSurface::BeginFrame(BeginFrameArgs args) {
|
| if (begin_frame_pending_ ||
|
| (pending_swap_buffers_ >= max_frames_pending_ && max_frames_pending_ > 0))
|
| return;
|
| TRACE_EVENT1("cc", "OutputSurface::BeginFrame",
|
| "pending_swap_buffers_", pending_swap_buffers_);
|
| begin_frame_pending_ = true;
|
| - client_->BeginFrame(frame_time);
|
| + client_->BeginFrame(args);
|
| }
|
|
|
| void OutputSurface::DidSwapBuffers() {
|
|
|