Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9abde299 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Update task surface visibility with reparent for pip

When a pip activity is reparented to its original task on top,
the task becomes visible because now it contains a visible activity.
This happens when leaving pip to fullscreen, i.e. finishTransition.
Currently the reparent operation is not included in a transition,
so the surface operations use pending transaction. But there can
be a orientation change happens in finishTransition, which triggers
to start collecting all visible tasks, which will make them use
sync transaction. Then if prepareSurfaces is called after that,
the "reparent" and "show" will be applied by different transactions.
Which could causes to flicker. So this change makes sure the
"reparent" and "show" are applied in the same transaction.

It was lucky that surface placement contains all prepareSurface,
since it was optimized out, invoke it explicitly.

Bug: 335046662
Test: Enter pip from a task which contains multiple activities.
      Expand the pip activity from portrait to landscape.
      The task should not disappear a few frames.
Change-Id: I48021aecf64311016747c58d1fdcb9e3381e5f92
parent b3942280
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