Skip to content
Commit e9ea91f4 authored by Robert Carr's avatar Robert Carr Committed by Rob Carr
Browse files

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
parent 0e4d7f14
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment