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

Commit da470061 authored by Patrick Williams's avatar Patrick Williams
Browse files

Add TransactionHandle to cleanup Transaction resources

TransactionHandle introduces a reliable mechanism for cleaning up resources even if the corresponding Transaction has been parceled and/or sent to another process. Transaction callbacks are removed from TransactionCompletedListener when the last reference to a TransactionHandle is dropped. If the transaction is applied, the TransactionHandles registered for its callbacks are passed to SurfaceFlinger and then back to the client process, keeping them alive until after the callbacks are called. If the transaction is dropped without getting applied, uncalled callbacks and corresponding SurfaceControl references are removed from TransactionCompletedListener.

Bug: 261757446
Flag: com.android.graphics.libgui.flags.unapplied_transaction_cleanup
Test: atest libgui_test --test-filter='TransactionCallbackTest*'
Change-Id: I5099ec819e31f4b83e7069ff3fb117d8d9708d1e
parent be3f3316
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