Migrate hybrid rotation animation with shell transition
This makes commit 1a7dc4c2 support shell transition for the case of display rotation with CHANGE type transition. To reduce the latency of rotation animation by not waiting for some insignificant windows. An example: 1. Rotation changed, request change transition. 2. Collect the windows that don't need to be synced with transition into fade controller (the windows still have state SYNC_STATE_WAITING_FOR_DRAW) and create animation leash for them. Assume there are X and Y. 3. Start transition, that collects visible task and visible non-app window tokens which won't be handled by the fade controller. 4. The participated windows are drawn, so onTransactionReady is called and send the start transaction to shell. 5. X reported drawn. But because the start transaction has not committed, postpone to execute the animation. Otherwise the fade-in animation shows before rotation animation that will look flickering. 6. Shell applies the start transaction, which includes - Merged sync transaction (includes X,Y). - Show rotation layer (screenshot). - Hide the leash of X,Y (It is usually covered by screenshot, just in case to ensure smooth fade-in). 7. The commit callback of start transaction is called. Start to fade in X (It is usually unobservable because rotation animation is also running). 8. The rotation animation finished (finishTransition). 9. Y is really slow and finished now. Fade in it directly. This fade animation will be observable. Bug: 206487939 Test: TransitionTests#testDisplayRotationChange DisplayContentTests#testHybridRotationAnimation Change-Id: If4635abc7ef57cac8a925d9613d988ef3ade62b7
Loading
Please register or sign in to comment