Reduce SF stateLock on screenshot path
Minimizes the areas that we accesss mStateLock on the screenshot path by grouping all work that requires mStateLock in the same stage of the screenshot. Simplifies the captureDisplay functions and RegionSamplingThread to only access the display on the main thread with the state lock held. This removes the need to pass around the display as a wp, which was originally necessary due to sp<DisplayDevice> lifetime limitations. Bug: b/377758217, b/159112860 Test: atest SurfaceFlinger_test Test: atest CompositionTest Test: atest RegionSamplingTest (libgui and sf) Flag: EXEMPT, refactor Change-Id: Ia88cf5dfbea35cd0531e469e4d01276ebce9feb4
Loading
Please register or sign in to comment