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
Loading
Please register or sign in to comment