OLD | NEW |
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 if (synthetic_frame_source_) | 125 if (synthetic_frame_source_) |
126 synthetic_frame_source_->OnUpdateVSyncParameters(timebase, interval); | 126 synthetic_frame_source_->OnUpdateVSyncParameters(timebase, interval); |
127 } | 127 } |
128 | 128 |
129 void Scheduler::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { | 129 void Scheduler::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { |
130 DCHECK_GE(draw_time.ToInternalValue(), 0); | 130 DCHECK_GE(draw_time.ToInternalValue(), 0); |
131 estimated_parent_draw_time_ = draw_time; | 131 estimated_parent_draw_time_ = draw_time; |
132 } | 132 } |
133 | 133 |
134 void Scheduler::SetCanStart() { | |
135 state_machine_.SetCanStart(); | |
136 ProcessScheduledActions(); | |
137 } | |
138 | |
139 void Scheduler::SetVisible(bool visible) { | 134 void Scheduler::SetVisible(bool visible) { |
140 state_machine_.SetVisible(visible); | 135 state_machine_.SetVisible(visible); |
141 UpdateCompositorTimingHistoryRecordingEnabled(); | 136 UpdateCompositorTimingHistoryRecordingEnabled(); |
142 ProcessScheduledActions(); | 137 ProcessScheduledActions(); |
143 } | 138 } |
144 | 139 |
145 void Scheduler::SetCanDraw(bool can_draw) { | 140 void Scheduler::SetCanDraw(bool can_draw) { |
146 state_machine_.SetCanDraw(can_draw); | 141 state_machine_.SetCanDraw(can_draw); |
147 ProcessScheduledActions(); | 142 ProcessScheduledActions(); |
148 } | 143 } |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 } | 827 } |
833 | 828 |
834 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 829 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
835 return (state_machine_.begin_main_frame_state() == | 830 return (state_machine_.begin_main_frame_state() == |
836 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || | 831 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || |
837 state_machine_.begin_main_frame_state() == | 832 state_machine_.begin_main_frame_state() == |
838 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); | 833 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); |
839 } | 834 } |
840 | 835 |
841 } // namespace cc | 836 } // namespace cc |
OLD | NEW |