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

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: Rebase 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
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/output/output_surface_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.cc
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index 160f86dcfb0bf22c9a98201b27c863e9391365c9..99bce2c84d7ca13c7bd74be01d56015e922e5edf 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,
+ const BeginFrameArgs& args) {
DCHECK(frame_rate_controller_);
if (!throttled)
- BeginFrame(frame_rate_controller_->LastTickTime());
+ BeginFrame(args);
}
// Forwarded to OutputSurfaceClient
@@ -145,7 +149,7 @@ void OutputSurface::SetNeedsBeginFrame(bool enable) {
frame_rate_controller_->SetActive(enable);
}
-void OutputSurface::BeginFrame(base::TimeTicks frame_time) {
+void OutputSurface::BeginFrame(const BeginFrameArgs& args) {
TRACE_EVENT2("cc", "OutputSurface::BeginFrame",
"begin_frame_pending_", begin_frame_pending_,
"pending_swap_buffers_", pending_swap_buffers_);
@@ -153,7 +157,7 @@ void OutputSurface::BeginFrame(base::TimeTicks frame_time) {
(pending_swap_buffers_ >= max_frames_pending_ && max_frames_pending_ > 0))
return;
begin_frame_pending_ = true;
- client_->BeginFrame(frame_time);
+ client_->BeginFrame(args);
}
void OutputSurface::DidSwapBuffers() {
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/output/output_surface_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698