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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
631 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"), | 631 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"), |
632 "SchedulerStateMachine", | 632 "SchedulerStateMachine", |
633 "state", | 633 "state", |
634 AsValue()); | 634 AsValue()); |
635 state_machine_.UpdateState(action); | 635 state_machine_.UpdateState(action); |
636 base::AutoReset<SchedulerStateMachine::Action> | 636 base::AutoReset<SchedulerStateMachine::Action> |
637 mark_inside_action(&inside_action_, action); | 637 mark_inside_action(&inside_action_, action); |
638 switch (action) { | 638 switch (action) { |
639 case SchedulerStateMachine::ACTION_NONE: | 639 case SchedulerStateMachine::ACTION_NONE: |
640 break; | 640 break; |
641 case SchedulerStateMachine::ACTION_ANIMATE: | 641 case SchedulerStateMachine::ACTION_ANIMATE: |
Ken Russell (switch to Gerrit)
2014/08/29 22:25:43
I don't know this code. Is there any chance this a
Zhenyao Mo
2014/08/29 23:11:11
Same as explained in the other reply.
| |
642 client_->ScheduledActionAnimate(); | 642 client_->ScheduledActionAnimate(); |
643 break; | 643 break; |
644 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME: | 644 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME: |
645 VLOG(2) << "Scheduler::ProcessScheduledActions: " | |
646 "ACTION_SEND_BEGIN_MAIN_FRAME"; | |
645 client_->ScheduledActionSendBeginMainFrame(); | 647 client_->ScheduledActionSendBeginMainFrame(); |
646 break; | 648 break; |
647 case SchedulerStateMachine::ACTION_COMMIT: | 649 case SchedulerStateMachine::ACTION_COMMIT: |
648 client_->ScheduledActionCommit(); | 650 client_->ScheduledActionCommit(); |
649 break; | 651 break; |
650 case SchedulerStateMachine::ACTION_UPDATE_VISIBLE_TILES: | 652 case SchedulerStateMachine::ACTION_UPDATE_VISIBLE_TILES: |
651 client_->ScheduledActionUpdateVisibleTiles(); | 653 client_->ScheduledActionUpdateVisibleTiles(); |
652 break; | 654 break; |
653 case SchedulerStateMachine::ACTION_ACTIVATE_SYNC_TREE: | 655 case SchedulerStateMachine::ACTION_ACTIVATE_SYNC_TREE: |
654 client_->ScheduledActionActivateSyncTree(); | 656 client_->ScheduledActionActivateSyncTree(); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
755 } | 757 } |
756 | 758 |
757 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 759 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
758 return (state_machine_.commit_state() == | 760 return (state_machine_.commit_state() == |
759 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || | 761 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || |
760 state_machine_.commit_state() == | 762 state_machine_.commit_state() == |
761 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); | 763 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); |
762 } | 764 } |
763 | 765 |
764 } // namespace cc | 766 } // namespace cc |
OLD | NEW |