SyncRtSurfaceTransactionApplier: Improve thread safety
If the calling thread releases the SurfaceControl passed
to SyncRtSurfaceTransactionApplier concurrently with the
applier preparing the transaction, this can lead to a
synchronization error and a crash. Once the state is
inside the transaction no further synchronization is required
as the native transaction will hold its own sp<SurfaceControl>
reference. By constructing the Transaction on the calling thread
and deferring application to the RenderThread we enable the calling
thread to not have any release synchronization requirements with
RenderThread.
Bug: 186391509
Change-Id: I585e1a9d3baf9ea384b00408b6253f34487d5037
2 files changed