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

Commit 674d5b37 authored by Melody Hsu's avatar Melody Hsu
Browse files

Exit gracefully from offscreen layer cycles

SurfaceFlinger would crash when encountering layer cycles,
and this path is primarily exercised when screenshotting an
offscreen layer root. Offscreen layers may have loops but are
not visited during display composition. However, screenshots
can be taken of offscreen layers. Catch the cycle and exit the
screenshot request as a no-op.

Fixes: b/382620055, b/432594483
Test: atest ScreenCaptureTest#captureOffscreenCyclicalHierarchyFails
Test: atest SurfaceFlinger_test
Test: atest CompositionTest
Flag: EXEMPT, bug fix
Change-Id: Ifb3efdadca0d4a28b312ab0b32b54b3941fa9c5d
parent 1a1fecfe
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