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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 break; | 192 break; |
193 } | 193 } |
194 action = state_machine_.NextAction(); | 194 action = state_machine_.NextAction(); |
195 } | 195 } |
196 | 196 |
197 // Activate or deactivate the frame rate controller. | 197 // Activate or deactivate the frame rate controller. |
198 frame_rate_controller_->SetActive(state_machine_.VSyncCallbackNeeded()); | 198 frame_rate_controller_->SetActive(state_machine_.VSyncCallbackNeeded()); |
199 client_->DidAnticipatedDrawTimeChange(frame_rate_controller_->NextTickTime()); | 199 client_->DidAnticipatedDrawTimeChange(frame_rate_controller_->NextTickTime()); |
200 } | 200 } |
201 | 201 |
| 202 bool Scheduler::WillDrawIfNeeded() const { |
| 203 return !state_machine_.DrawSuspendedUntilCommit(); |
| 204 } |
| 205 |
202 } // namespace cc | 206 } // namespace cc |
OLD | NEW |