WindowState: applyWithNextDraw fixes
In this CL we make a few fixes to harden applyWithNextDraw. 1. Currently there is a bug where we apply the transaction directly in executeDrawHandlers, this breaks BLAST sync as we need to pass the post draw transaction on, not apply it. 2. When we pass it on, we expose a bug in WindowStateAnimator#finishDrawing if the state is DRAW_PENDING we merge to mPostDrawTransaction instead of applying, but mPostDrawTransaction is only applied if mLastHidden is true. Rotation resets mDrawState=DRAW_PENDING but doesnt reset mLastHidden so this means transactions that end up in mPostDrawTransaction as a result of rotation would be lost. We modify finishDrawing to check mLastHidden and see if we will apply later. 3. The timing of prepareDrawHandlers should be moved to the end of relayout, so that calling it works while in relayout. 4. We should clear mRedrawForSyncReported when preparingDrawHandlers, if the client got the changes in relayout we dont need the client to call relayout again. 5. Add a big comment explaining how all this works. Bug: 168505645 Test: Existing tests pass Change-Id: Icd79cc98abb01c73cecff053ef9ca990034d0891
Loading
Please register or sign in to comment