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/logging.h" | 10 #include "base/logging.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 client_->ScheduledActionAcquireLayerTexturesForMainThread(); | 296 client_->ScheduledActionAcquireLayerTexturesForMainThread(); |
297 break; | 297 break; |
298 } | 298 } |
299 } while (action != SchedulerStateMachine::ACTION_NONE); | 299 } while (action != SchedulerStateMachine::ACTION_NONE); |
300 | 300 |
301 state_machine_.AdvanceBeginFrameStateWhenNoActionsRemain(); | 301 state_machine_.AdvanceBeginFrameStateWhenNoActionsRemain(); |
302 SetupNextBeginFrameIfNeeded(); | 302 SetupNextBeginFrameIfNeeded(); |
303 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); | 303 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); |
304 } | 304 } |
305 | 305 |
| 306 bool Scheduler::ActiveTreeNeedsFirstDraw() const { |
| 307 return state_machine_.active_tree_needs_first_draw(); |
| 308 } |
| 309 |
306 bool Scheduler::WillDrawIfNeeded() const { | 310 bool Scheduler::WillDrawIfNeeded() const { |
307 return !state_machine_.PendingDrawsShouldBeAborted(); | 311 return !state_machine_.PendingDrawsShouldBeAborted(); |
308 } | 312 } |
309 | 313 |
310 } // namespace cc | 314 } // namespace cc |
OLD | NEW |