Move blocking surface operations out of lock
SurfaceFlinger may take a while when toggling display power mode.
The caller who uses the other sync methods of SurfaceControl at
this time will also be blocked.
Because these procedures may be called during traversal, that may
affect the speed of unlocking.
DisplayManagerService:
performTraversalLocked -> configureDisplayLocked
-> LocalDisplay: configureDisplayLocked
-> LocalDisplayAdapter.LocalDisplayDevice:
setDesiredDisplayModeSpecsLocked
setRequestedColorModeLocked
Bug: 143234343
Test: 1. Add trace around
DisplayManagerService#performTraversalInternal
and SurfaceControl#setDisplayPowerMode.
2. Remove check of mode change (force always update).
3. Turn on/off screen and check the trace that
animation thread should not be blocked by a
binder transaction to SurfaceFlinger.
Change-Id: Icd916d6c7b4e3fda485f41ca8b3da56521e12a06
1 file changed