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

Skip to content
Commit df3c5e8b authored by chaviw's avatar chaviw
Browse files

Fix some issues with pending buffer traces

1. If there is already something in the pending transactions queue, we
will skip calling transactionIsReadyToBeApplied. This means we won't
increment the buffer count properly. Instead, call
transactionIsReadyToBeApplied first since it's pretty harmless and will
update the buffer count if needed.

2. updateActiveBuffer can be called multiple times with the same buffer.
This is because when checking hasReadyFrame, we only check if something
has been modified and there's a buffer. It's possible that the geometry
was updated, but we didn't receive a new buffer. In that case, we'd still
call updateActiveBuffer. That would call decrementPendingBufferCount which
is incorrect since there's no new buffer.

Instead, check if the buffer has changed in updateActiveBuffer before
calling decrementPendingBufferCount to make sure the buffer getting
updated is a new buffer buffer.

Test: trace isn't going negative
Fixes: 176903239
Change-Id: I0bd492463e5e440db16fc8bef1408b5156e961e4
parent 4d25380c
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