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
Loading
Please register or sign in to comment