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

Commit 0a4b33ec authored by Jim Shargo's avatar Jim Shargo
Browse files

VirtualDisplays (v2): Do sink connection work off the main thread

This CL moves the logic for connecting to the sink surface onto the
per-UID VD thread. Because of this, we can time-bound the initialization
of virtual displays and prevent main thread freezes.

VirtualDisplaySurface now gets a future<SurfaceData> and will wait until
it is valid to finish its initialization. It's smart enough to avoid
waiting if the thread is already frozen and waits (currently 1ms) for
the future to be available.

Until the future is available, we'll refuse to schedule frames.

Bug: 340933138
Flag: com.android.graphics.surfaceflinger.flags.wb_virtualdisplay2
Test: atest, presubmit, new tests
Change-Id: I54979bb5ea503e13b3e9de7525a7c7f7b6aada99
parent 99e45019
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