Index: cc/output/output_surface.cc |
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc |
index e6179437ad323ff710311de4316b4e59b62c04bf..2d2ddf91099604459c5e685e61ce1ff5feb07ca3 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 ? |
piman
2013/06/14 22:53:46
What does has_parent_compositor really mean? Is th
brianderson
2013/06/14 23:32:12
On platforms that support BeginFrame natively, thi
|
+ 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() { |