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

Unified Diff: cc/scheduler/scheduler.cc

Issue 1025373002: cc: Fix incorrect deadline for MISSED BeginFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 4224ba07d0b7d3ecc05ce41d8dce238e98ad741f..482a86bf9c29e810eb7ab4966b0cef29c0292230 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -390,19 +390,19 @@ bool Scheduler::OnBeginFrameMixInDelegate(const BeginFrameArgs& args) {
client_->SendBeginFramesToChildren(adjusted_args_for_children);
}
+ BeginFrameArgs adjusted_args(args);
+ adjusted_args.deadline -= EstimatedParentDrawTime();
+
// We have just called SetNeedsBeginFrame(true) and the BeginFrameSource has
// sent us the last BeginFrame we have missed. As we might not be able to
// actually make rendering for this call, handle it like a "retro frame".
// TODO(brainderson): Add a test for this functionality ASAP!
- if (args.type == BeginFrameArgs::MISSED) {
- begin_retro_frame_args_.push_back(args);
+ if (adjusted_args.type == BeginFrameArgs::MISSED) {
+ begin_retro_frame_args_.push_back(adjusted_args);
PostBeginRetroFrameIfNeeded();
return true;
}
- BeginFrameArgs adjusted_args(args);
- adjusted_args.deadline -= EstimatedParentDrawTime();
-
bool should_defer_begin_frame;
if (settings_.using_synchronous_renderer_compositor) {
should_defer_begin_frame = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698