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

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

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_state_machine_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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 break; 716 break;
717 } 717 }
718 } while (action != SchedulerStateMachine::ACTION_NONE); 718 } while (action != SchedulerStateMachine::ACTION_NONE);
719 719
720 SetupNextBeginFrameIfNeeded(); 720 SetupNextBeginFrameIfNeeded();
721 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); 721 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime());
722 722
723 RescheduleBeginImplFrameDeadlineIfNeeded(); 723 RescheduleBeginImplFrameDeadlineIfNeeded();
724 } 724 }
725 725
726 bool Scheduler::WillDrawIfNeeded() const {
727 return !state_machine_.PendingDrawsShouldBeAborted();
728 }
729
730 scoped_refptr<base::debug::ConvertableToTraceFormat> Scheduler::AsValue() 726 scoped_refptr<base::debug::ConvertableToTraceFormat> Scheduler::AsValue()
731 const { 727 const {
732 scoped_refptr<base::debug::TracedValue> state = 728 scoped_refptr<base::debug::TracedValue> state =
733 new base::debug::TracedValue(); 729 new base::debug::TracedValue();
734 AsValueInto(state.get()); 730 AsValueInto(state.get());
735 return state; 731 return state;
736 } 732 }
737 733
738 void Scheduler::AsValueInto(base::debug::TracedValue* state) const { 734 void Scheduler::AsValueInto(base::debug::TracedValue* state) const {
739 state->BeginDictionary("state_machine"); 735 state->BeginDictionary("state_machine");
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 } 800 }
805 801
806 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 802 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
807 return (state_machine_.commit_state() == 803 return (state_machine_.commit_state() ==
808 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 804 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
809 state_machine_.commit_state() == 805 state_machine_.commit_state() ==
810 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 806 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
811 } 807 }
812 808
813 } // namespace cc 809 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698