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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "cc/scheduler_state_machine.h" | 7 #include "cc/scheduler_state_machine.h" |
8 | 8 |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 using namespace cc; | 11 namespace cc { |
12 | |
13 namespace { | 12 namespace { |
14 | 13 |
15 const SchedulerStateMachine::CommitState allCommitStates[] = { | 14 const SchedulerStateMachine::CommitState allCommitStates[] = { |
16 SchedulerStateMachine::COMMIT_STATE_IDLE, | 15 SchedulerStateMachine::COMMIT_STATE_IDLE, |
17 SchedulerStateMachine::COMMIT_STATE_FRAME_IN_PROGRESS, | 16 SchedulerStateMachine::COMMIT_STATE_FRAME_IN_PROGRESS, |
18 SchedulerStateMachine::COMMIT_STATE_READY_TO_COMMIT, | 17 SchedulerStateMachine::COMMIT_STATE_READY_TO_COMMIT, |
19 SchedulerStateMachine::COMMIT_STATE_WAITING_FOR_FIRST_DRAW | 18 SchedulerStateMachine::COMMIT_STATE_WAITING_FOR_FIRST_DRAW |
20 }; | 19 }; |
21 | 20 |
22 // Exposes the protected state fields of the SchedulerStateMachine for testing | 21 // Exposes the protected state fields of the SchedulerStateMachine for testing |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 StateMachine state; | 862 StateMachine state; |
864 state.setCanBeginFrame(true); | 863 state.setCanBeginFrame(true); |
865 state.setVisible(true); | 864 state.setVisible(true); |
866 state.setCanDraw(true); | 865 state.setCanDraw(true); |
867 state.setNeedsCommit(true); | 866 state.setNeedsCommit(true); |
868 state.setNeedsForcedCommit(true); | 867 state.setNeedsForcedCommit(true); |
869 state.didLoseContext(); | 868 state.didLoseContext(); |
870 EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction()); | 869 EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction()); |
871 } | 870 } |
872 | 871 |
873 } // anonymous namespace | 872 } // namespace |
| 873 } // namespace cc |
OLD | NEW |