VirtualDisplays (v2): Simplify frozen thread logic
Previously, we'd check whether the underlying thread is frozen when scheduling the work to send it over. This leads to a bunch of extra buffer management that I think is kind of confusing to read. Technically there's a time-of-check--time-of-use situation here where a the check for whether the underlying thread is frozen returns false, then frame could be rendered and submitted, and in the meantime it registers as frozen... but I think this is still a subtle issue even with the code as it was. It's unlikely in either case, though this version is slightly more error prone. We only incur the cost of one scheduled operation. Bug: 340933138 Flag: com.android.graphics.surfaceflinger.flags.wb_virtualdisplay2 Test: atest Change-Id: I10c1371b4a1d057f9e094076c396d369c581cc6e
Loading
Please register or sign in to comment