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

Unified Diff: cc/scheduler/scheduler.cc

Issue 1121233005: Don't adjust deadline for children BeginFrames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make test fail without this patch; add TODOs Created 5 years, 7 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 | cc/scheduler/scheduler_unittest.cc » ('j') | 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 5ffd59c095e62e1c67acc15acf582acdb3ce0f2c..afc908d6a6d4baebf4d8eb84f11e9012a0e9bdb2 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -340,23 +340,15 @@ void Scheduler::SetupPollingMechanisms() {
bool Scheduler::OnBeginFrameMixInDelegate(const BeginFrameArgs& args) {
TRACE_EVENT1("cc,benchmark", "Scheduler::BeginFrame", "args", args.AsValue());
- // Deliver BeginFrames to children.
- if (state_machine_.children_need_begin_frames()) {
- BeginFrameArgs adjusted_args_for_children(args);
- // Adjust a deadline for child schedulers.
- // TODO(simonhong): Once we have commitless update, we can get rid of
- // BeginMainFrameToCommitDurationEstimate() +
- // CommitToActivateDurationEstimate().
- adjusted_args_for_children.deadline -=
- (client_->BeginMainFrameToCommitDurationEstimate() +
- client_->CommitToActivateDurationEstimate() +
- client_->DrawDurationEstimate() + EstimatedParentDrawTime());
- client_->SendBeginFramesToChildren(adjusted_args_for_children);
- }
-
+ // TODO(brianderson): Adjust deadline in the DisplayScheduler.
BeginFrameArgs adjusted_args(args);
adjusted_args.deadline -= EstimatedParentDrawTime();
+ // Deliver BeginFrames to children.
+ // TODO(brianderson): Move this responsibility to the DisplayScheduler.
+ if (state_machine_.children_need_begin_frames())
+ client_->SendBeginFramesToChildren(adjusted_args);
+
if (settings_.using_synchronous_renderer_compositor) {
BeginImplFrameSynchronous(adjusted_args);
return true;
« no previous file with comments | « no previous file | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698