Skip to content
Commit 8b37bc0a authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent fbe8eca9
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