blast: Queue transactions by applying client

Do not update SurfaceFlinger until all the fences in a transaction
have signaled. While waiting on the fences, place the transaction
in a queue with other transactions that were applied by the
same SurfaceComposerClient.

Test: Transaction_test
Bug: 80477568

Change-Id: I6b866bfa955d5eafef28016a0c5de7c3862f1837
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 9586219..5b004e2 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -264,7 +264,9 @@
     mAnimation = false;
     mEarlyWakeup = false;
 
-    sf->setTransactionState(composerStates, displayStates, flags);
+    sp<IBinder> applyToken = IInterface::asBinder(TransactionCompletedListener::getIInstance());
+
+    sf->setTransactionState(composerStates, displayStates, flags, applyToken);
     mStatus = NO_ERROR;
     return NO_ERROR;
 }