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

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

Issue 935333002: Update from https://crrev.com/316786 (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_settings.h » ('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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 break; 733 break;
734 } 734 }
735 } while (action != SchedulerStateMachine::ACTION_NONE); 735 } while (action != SchedulerStateMachine::ACTION_NONE);
736 736
737 SetupNextBeginFrameIfNeeded(); 737 SetupNextBeginFrameIfNeeded();
738 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); 738 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime());
739 739
740 RescheduleBeginImplFrameDeadlineIfNeeded(); 740 RescheduleBeginImplFrameDeadlineIfNeeded();
741 } 741 }
742 742
743 scoped_refptr<base::debug::ConvertableToTraceFormat> Scheduler::AsValue() 743 scoped_refptr<base::trace_event::ConvertableToTraceFormat> Scheduler::AsValue()
744 const { 744 const {
745 scoped_refptr<base::debug::TracedValue> state = 745 scoped_refptr<base::trace_event::TracedValue> state =
746 new base::debug::TracedValue(); 746 new base::trace_event::TracedValue();
747 AsValueInto(state.get()); 747 AsValueInto(state.get());
748 return state; 748 return state;
749 } 749 }
750 750
751 void Scheduler::AsValueInto(base::debug::TracedValue* state) const { 751 void Scheduler::AsValueInto(base::trace_event::TracedValue* state) const {
752 state->BeginDictionary("state_machine"); 752 state->BeginDictionary("state_machine");
753 state_machine_.AsValueInto(state, Now()); 753 state_machine_.AsValueInto(state, Now());
754 state->EndDictionary(); 754 state->EndDictionary();
755 755
756 // Only trace frame sources when explicitly enabled - http://crbug.com/420607 756 // Only trace frame sources when explicitly enabled - http://crbug.com/420607
757 bool frame_tracing_enabled = false; 757 bool frame_tracing_enabled = false;
758 TRACE_EVENT_CATEGORY_GROUP_ENABLED( 758 TRACE_EVENT_CATEGORY_GROUP_ENABLED(
759 TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.frames"), 759 TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.frames"),
760 &frame_tracing_enabled); 760 &frame_tracing_enabled);
761 if (frame_tracing_enabled) { 761 if (frame_tracing_enabled) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 } 818 }
819 819
820 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 820 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
821 return (state_machine_.commit_state() == 821 return (state_machine_.commit_state() ==
822 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 822 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
823 state_machine_.commit_state() == 823 state_machine_.commit_state() ==
824 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 824 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
825 } 825 }
826 826
827 } // namespace cc 827 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698