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 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/debug/trace_event_argument.h" | 10 #include "base/debug/trace_event_argument.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 void Scheduler::SetCanDraw(bool can_draw) { | 190 void Scheduler::SetCanDraw(bool can_draw) { |
191 state_machine_.SetCanDraw(can_draw); | 191 state_machine_.SetCanDraw(can_draw); |
192 ProcessScheduledActions(); | 192 ProcessScheduledActions(); |
193 } | 193 } |
194 | 194 |
195 void Scheduler::NotifyReadyToActivate() { | 195 void Scheduler::NotifyReadyToActivate() { |
196 state_machine_.NotifyReadyToActivate(); | 196 state_machine_.NotifyReadyToActivate(); |
197 ProcessScheduledActions(); | 197 ProcessScheduledActions(); |
198 } | 198 } |
199 | 199 |
| 200 void Scheduler::NotifyReadyToDraw() { |
| 201 // Empty for now, until we take action based on the notification as part of |
| 202 // crbugs 352894, 383157, 421923. |
| 203 } |
| 204 |
200 void Scheduler::SetNeedsCommit() { | 205 void Scheduler::SetNeedsCommit() { |
201 state_machine_.SetNeedsCommit(); | 206 state_machine_.SetNeedsCommit(); |
202 ProcessScheduledActions(); | 207 ProcessScheduledActions(); |
203 } | 208 } |
204 | 209 |
205 void Scheduler::SetNeedsRedraw() { | 210 void Scheduler::SetNeedsRedraw() { |
206 state_machine_.SetNeedsRedraw(); | 211 state_machine_.SetNeedsRedraw(); |
207 ProcessScheduledActions(); | 212 ProcessScheduledActions(); |
208 } | 213 } |
209 | 214 |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 } | 777 } |
773 | 778 |
774 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 779 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
775 return (state_machine_.commit_state() == | 780 return (state_machine_.commit_state() == |
776 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || | 781 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || |
777 state_machine_.commit_state() == | 782 state_machine_.commit_state() == |
778 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); | 783 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); |
779 } | 784 } |
780 | 785 |
781 } // namespace cc | 786 } // namespace cc |
OLD | NEW |