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

Side by Side Diff: cc/scheduler/scheduler.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 return begin_impl_frame_args_.frame_time; 328 return begin_impl_frame_args_.frame_time;
329 } 329 }
330 330
331 void Scheduler::SetupNextBeginFrameIfNeeded() { 331 void Scheduler::SetupNextBeginFrameIfNeeded() {
332 if (!task_runner_.get()) 332 if (!task_runner_.get())
333 return; 333 return;
334 334
335 if (state_machine_.ShouldSetNeedsBeginFrames( 335 if (state_machine_.ShouldSetNeedsBeginFrames(
336 frame_source_->NeedsBeginFrames())) { 336 frame_source_->NeedsBeginFrames())) {
337 frame_source_->SetNeedsBeginFrames(state_machine_.BeginFrameNeeded()); 337 frame_source_->SetNeedsBeginFrames(state_machine_.BeginFrameNeeded());
338 if (!frame_source_->NeedsBeginFrames()) {
339 client_->SendBeginMainFrameNotExpectedSoon();
340 }
341 } 338 }
342 339
343 if (state_machine_.begin_impl_frame_state() == 340 if (state_machine_.begin_impl_frame_state() ==
344 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE) { 341 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE) {
345 frame_source_->DidFinishFrame(begin_retro_frame_args_.size()); 342 frame_source_->DidFinishFrame(begin_retro_frame_args_.size());
346 } 343 }
347 344
348 PostBeginRetroFrameIfNeeded(); 345 PostBeginRetroFrameIfNeeded();
349 SetupPollingMechanisms(); 346 SetupPollingMechanisms();
350 } 347 }
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 } 818 }
822 819
823 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 820 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
824 return (state_machine_.commit_state() == 821 return (state_machine_.commit_state() ==
825 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 822 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
826 state_machine_.commit_state() == 823 state_machine_.commit_state() ==
827 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 824 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
828 } 825 }
829 826
830 } // namespace cc 827 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698