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

Unified Diff: cc/output/output_surface.cc

Issue 16863005: cc: Add BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc12
Patch Set: Fix android compile Created 7 years, 6 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/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() {

Powered by Google App Engine
This is Rietveld 408576698