| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::SetVisible(bool visible) { | 134 void Scheduler::SetVisible(bool visible) { |
| 135 state_machine_.SetVisible(visible); | 135 state_machine_.SetVisible(visible); |
| 136 UpdateCompositorTimingHistoryRecordingEnabled(); | 136 UpdateCompositorTimingHistoryRecordingEnabled(); |
| 137 ProcessScheduledActions(); | 137 ProcessScheduledActions(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void Scheduler::SetResourcelessSoftareDraw(bool resourceless_draw) { |
| 141 state_machine_.SetResourcelessSoftareDraw(resourceless_draw); |
| 142 ProcessScheduledActions(); |
| 143 } |
| 144 |
| 140 void Scheduler::SetCanDraw(bool can_draw) { | 145 void Scheduler::SetCanDraw(bool can_draw) { |
| 141 state_machine_.SetCanDraw(can_draw); | 146 state_machine_.SetCanDraw(can_draw); |
| 142 ProcessScheduledActions(); | 147 ProcessScheduledActions(); |
| 143 } | 148 } |
| 144 | 149 |
| 145 void Scheduler::NotifyReadyToActivate() { | 150 void Scheduler::NotifyReadyToActivate() { |
| 146 compositor_timing_history_->ReadyToActivate(); | 151 compositor_timing_history_->ReadyToActivate(); |
| 147 state_machine_.NotifyReadyToActivate(); | 152 state_machine_.NotifyReadyToActivate(); |
| 148 ProcessScheduledActions(); | 153 ProcessScheduledActions(); |
| 149 } | 154 } |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 } | 832 } |
| 828 | 833 |
| 829 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 834 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
| 830 return (state_machine_.begin_main_frame_state() == | 835 return (state_machine_.begin_main_frame_state() == |
| 831 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || | 836 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || |
| 832 state_machine_.begin_main_frame_state() == | 837 state_machine_.begin_main_frame_state() == |
| 833 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); | 838 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); |
| 834 } | 839 } |
| 835 | 840 |
| 836 } // namespace cc | 841 } // namespace cc |
| OLD | NEW |