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

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

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl 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 }
338 } 341 }
339 342
340 if (state_machine_.begin_impl_frame_state() == 343 if (state_machine_.begin_impl_frame_state() ==
341 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE) { 344 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE) {
342 frame_source_->DidFinishFrame(begin_retro_frame_args_.size()); 345 frame_source_->DidFinishFrame(begin_retro_frame_args_.size());
343 } 346 }
344 347
345 PostBeginRetroFrameIfNeeded(); 348 PostBeginRetroFrameIfNeeded();
346 SetupPollingMechanisms(); 349 SetupPollingMechanisms();
347 } 350 }
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 } 821 }
819 822
820 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 823 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
821 return (state_machine_.commit_state() == 824 return (state_machine_.commit_state() ==
822 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 825 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
823 state_machine_.commit_state() == 826 state_machine_.commit_state() ==
824 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 827 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
825 } 828 }
826 829
827 } // namespace cc 830 } // 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