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

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

Ensure thread safety with render thread and UI Thread.

There were a few places that were not thread safe.

1. finishBLASTSync is called from the Render Thread. It
was updating mSurfaceChangedTransaction, which send to WMS on the
UI Thread. Instead, create a new local Transaction object to allow the
Render Thread to merge the mRtBLASTSyncTransaction into it. Then on the
UI thread, merge the temporary transaction into mSurfaceChangedTransaction

2. finishBLASTSync was getting called if the draw was unable to run
asynchronously. This would mean it would get executed on the UI Thread,
possibly causing a race. Instead, remove since there should be nothing
on the blast sync transaction, mRtNextFrameReportedConsumeWithBlast
would never have been set, and mSendNextFrameToWm is set to false
beforehand.

Test: YT with and without Blast
Change-Id: I72e70fea258a933f51aaaf78c7056a0d3fbac8b3
parent ae00abf8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment