Introduce updateVisibility and updateLayout
This is a step to let the client layout its window locally. The ultimate goal is to reduce the jank while laying out the window. With the new AIDL methods, we can divide IWindowSession.relayout into: - IWindowSession#updateVisibility (synchronized binder call) - To get or update the surface - To fetch the latest factors about window-layout - Only called when the view visibility is changed - WindowLayout#computeFrames (local function call) - To compute the window frames - IWindowSession#updateLayout (one way binder call) - To report the result of layout to the server In this way, if the view visibility is not changed, the UI thread of the client won't be blocked by the binder call during relayout. The local layout project won't be done in a single CL. In order not to break the existing logic, this CL introduces a flag: LOCAL_LAYOUT. The flag will be enabled when the logic of local layout is ready. Bug: 161810301 Bug: 175861051 Test: presubmit (no behavior change) Change-Id: Ic4b2fc78a318f3a68e1ef8a35d8f3ab705856702
Loading
Please register or sign in to comment