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

Commit 23892a2f authored by Jim Shargo's avatar Jim Shargo
Browse files

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
parent 0a4b33ec
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