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

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

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/resources/transparency_display_item.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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 state_machine_.SetChildrenNeedBeginFrames(children_need_begin_frames); 449 state_machine_.SetChildrenNeedBeginFrames(children_need_begin_frames);
450 ProcessScheduledActions(); 450 ProcessScheduledActions();
451 } 451 }
452 452
453 // BeginRetroFrame is called for BeginFrames that we've deferred because 453 // BeginRetroFrame is called for BeginFrames that we've deferred because
454 // the scheduler was in the middle of processing a previous BeginFrame. 454 // the scheduler was in the middle of processing a previous BeginFrame.
455 void Scheduler::BeginRetroFrame() { 455 void Scheduler::BeginRetroFrame() {
456 TRACE_EVENT0("cc", "Scheduler::BeginRetroFrame"); 456 TRACE_EVENT0("cc", "Scheduler::BeginRetroFrame");
457 DCHECK(!settings_.using_synchronous_renderer_compositor); 457 DCHECK(!settings_.using_synchronous_renderer_compositor);
458 DCHECK(begin_retro_frame_posted_); 458 DCHECK(begin_retro_frame_posted_);
459 DCHECK_EQ(state_machine_.begin_impl_frame_state(),
460 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE);
459 begin_retro_frame_posted_ = false; 461 begin_retro_frame_posted_ = false;
460 462
461 // If there aren't any retroactive BeginFrames, then we've lost the 463 // If there aren't any retroactive BeginFrames, then we've lost the
462 // OutputSurface and should abort. 464 // OutputSurface and should abort.
463 if (begin_retro_frame_args_.empty()) 465 if (begin_retro_frame_args_.empty())
464 return; 466 return;
465 467
466 // Discard expired BeginRetroFrames 468 // Discard expired BeginRetroFrames
467 // Today, we should always end up with at most one un-expired BeginRetroFrame 469 // Today, we should always end up with at most one un-expired BeginRetroFrame
468 // because deadlines will not be greater than the next frame time. We don't 470 // because deadlines will not be greater than the next frame time. We don't
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 } 803 }
802 804
803 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 805 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
804 return (state_machine_.commit_state() == 806 return (state_machine_.commit_state() ==
805 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 807 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
806 state_machine_.commit_state() == 808 state_machine_.commit_state() ==
807 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 809 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
808 } 810 }
809 811
810 } // namespace cc 812 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/transparency_display_item.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698