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 "CCSchedulerStateMachine.h" | 7 #include "CCSchedulerStateMachine.h" |
8 | 8 |
9 #include <gtest/gtest.h> | 9 #include <gtest/gtest.h> |
10 | 10 |
| 11 using namespace cc; |
11 using namespace WTF; | 12 using namespace WTF; |
12 using namespace WebCore; | |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 const CCSchedulerStateMachine::CommitState allCommitStates[] = { | 16 const CCSchedulerStateMachine::CommitState allCommitStates[] = { |
17 CCSchedulerStateMachine::COMMIT_STATE_IDLE, | 17 CCSchedulerStateMachine::COMMIT_STATE_IDLE, |
18 CCSchedulerStateMachine::COMMIT_STATE_FRAME_IN_PROGRESS, | 18 CCSchedulerStateMachine::COMMIT_STATE_FRAME_IN_PROGRESS, |
19 CCSchedulerStateMachine::COMMIT_STATE_UPDATING_RESOURCES, | 19 CCSchedulerStateMachine::COMMIT_STATE_UPDATING_RESOURCES, |
20 CCSchedulerStateMachine::COMMIT_STATE_READY_TO_COMMIT, | 20 CCSchedulerStateMachine::COMMIT_STATE_READY_TO_COMMIT, |
21 CCSchedulerStateMachine::COMMIT_STATE_WAITING_FOR_FIRST_DRAW | 21 CCSchedulerStateMachine::COMMIT_STATE_WAITING_FOR_FIRST_DRAW |
22 }; | 22 }; |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 state.setCanBeginFrame(true); | 1095 state.setCanBeginFrame(true); |
1096 state.setVisible(true); | 1096 state.setVisible(true); |
1097 state.setCanDraw(true); | 1097 state.setCanDraw(true); |
1098 state.setNeedsCommit(true); | 1098 state.setNeedsCommit(true); |
1099 state.setNeedsForcedCommit(true); | 1099 state.setNeedsForcedCommit(true); |
1100 state.didLoseContext(); | 1100 state.didLoseContext(); |
1101 EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction()); | 1101 EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction()); |
1102 } | 1102 } |
1103 | 1103 |
1104 } | 1104 } |
OLD | NEW |