Skip to content
Commit 7c861474 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Reparent child surfaces when swapping out new surfaces

When we need to create a new surface and swap out the old surface, we need to
preserve the old surface and wait for the new surface to be drawn by the client. The
old surface's z order is boosted so any new surface is drawn below the preserved
surface. Once the new surface is drawn, the preserved surface is hidden, new surface
is shown and the child surfaces of the preserved surface is reparented to the new
surface, all in one transaction.

If we have to create another surface before the swap has happened, we keep the
preserved surface and destroy the new but not shown surface. In this scenario,
this fix ensures we reparent any children back to the preserved surface.

Bug: 138380754
Test: Open SurfaceView app in split screen tap divider
Test: go/wm-smoke
Change-Id: Ibc1e82acdfd76f369af201ac0a7f6f0129a681a3
parent 40f9649c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment