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

Commit bf769e4b authored by Alec Mouri's avatar Alec Mouri
Browse files

Add initial support for display readback

We've had readback support for testing purposes for many, many releases
now, but now fullscreen capture is becoming more common, so we want to
hook this up into production.

Readback currently must be negotiated on the main surfaceflinger thread,
so the implementation will schedule a composition request to piggyback
readback parameters on top of (this is zero overhead during steady-state
compositing), pass the readback buffer over to HWC prior to validate(),
then receive the readback fence after present().

This is flag guarded in two ways: an aconfig flag to control the
rollout wholesale, and also a device opt-in. The device opt-in is
necessary since readback on some devices may not be production-ready due
to its historical test-only status.

Also fix a minor issue where we always add an excludedLayerId set of {0}
due to aggregate initialization.

Bug: 384816457
Flag: com.android.graphics.surfaceflinger.flags.readback_screenshot
Test: builds
Test: adb screencap
Change-Id: Ic70d01140748d34880cc6cbe740685153bcf5b27
parent 5f4f8313
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