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

Skip to content
Commit d48797b7 authored by Chavi Weingarten's avatar Chavi Weingarten
Browse files

Remove check for new requested sync before flushing shadow queue

In transactionCommittedCallback, the code checks to make sure there are
no sync transactions still in flight and checks if no new requested sync
has come in before flushing shadow queue. The second check was intented
to give onFrameAvailable a chance to drop these sandwiched frames.
However, that can't happen because by the time onFrameAvailable is
called, there is no sync in flight and it doesn't consider the frames
sandwiched, but rather frames that were just submitted before the sync.

Therefore, it's safe to just remove this check and attempt to flush the
shadow queue. This fixes the ANR since it will ensure frames are flushed
if possible by the time onFrameAvailable is called. If we have actually
ran out of buffers, there's a guarantee that a release callback should
occur, which will then flush the shadow queue at that point.

Fixes: 293692258
Test: race condition hard to reproduce
Change-Id: If3568c1db6b4063ee1b4044067d298e5c2c8b6f1
parent 0ef7824f
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