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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"), | 347 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"), |
348 "SchedulerStateMachine", | 348 "SchedulerStateMachine", |
349 "state", | 349 "state", |
350 TracedValue::FromValue(StateAsValue().release())); | 350 TracedValue::FromValue(StateAsValue().release())); |
351 state_machine_.UpdateState(action); | 351 state_machine_.UpdateState(action); |
352 base::AutoReset<SchedulerStateMachine::Action> | 352 base::AutoReset<SchedulerStateMachine::Action> |
353 mark_inside_action(&inside_action_, action); | 353 mark_inside_action(&inside_action_, action); |
354 switch (action) { | 354 switch (action) { |
355 case SchedulerStateMachine::ACTION_NONE: | 355 case SchedulerStateMachine::ACTION_NONE: |
356 break; | 356 break; |
| 357 case SchedulerStateMachine::ACTION_ANIMATE: |
| 358 client_->ScheduledActionAnimate(); |
| 359 break; |
357 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME: | 360 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME: |
358 client_->ScheduledActionSendBeginMainFrame(); | 361 client_->ScheduledActionSendBeginMainFrame(); |
359 break; | 362 break; |
360 case SchedulerStateMachine::ACTION_COMMIT: | 363 case SchedulerStateMachine::ACTION_COMMIT: |
361 client_->ScheduledActionCommit(); | 364 client_->ScheduledActionCommit(); |
362 break; | 365 break; |
363 case SchedulerStateMachine::ACTION_UPDATE_VISIBLE_TILES: | 366 case SchedulerStateMachine::ACTION_UPDATE_VISIBLE_TILES: |
364 client_->ScheduledActionUpdateVisibleTiles(); | 367 client_->ScheduledActionUpdateVisibleTiles(); |
365 break; | 368 break; |
366 case SchedulerStateMachine::ACTION_ACTIVATE_PENDING_TREE: | 369 case SchedulerStateMachine::ACTION_ACTIVATE_PENDING_TREE: |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 } | 447 } |
445 | 448 |
446 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 449 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
447 return (state_machine_.commit_state() == | 450 return (state_machine_.commit_state() == |
448 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || | 451 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || |
449 state_machine_.commit_state() == | 452 state_machine_.commit_state() == |
450 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); | 453 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); |
451 } | 454 } |
452 | 455 |
453 } // namespace cc | 456 } // namespace cc |
OLD | NEW |