SF: non blocking createSurface
The createSurface would add the created layer into current state, which would hold the state lock and may block the binder thread while the main thread is holding the same lock. This CL uses a transaction to perform the behaviors of adding the created layer into current state, so we could return the created layer without holding the lock and do other stuff in the main thread. Also make some test cases to perform a sync transaction after calling createSurface, that could make sure we have done the layer creation. Bug: 179647628 Test: atest libsurfaceflinger_unittest Test: atest SurfaceFlinger_test Test: libgui_test Test: SurfaceControlTest Change-Id: I394b74e9c1cc675df4cacd38ab5da24f0492289d
Loading
Please register or sign in to comment