Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06f456db authored by Melody Hsu's avatar Melody Hsu
Browse files

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
parent 22bca30e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment