Merge "Creating the transaction on the UI thread" into tm-dev

This commit is contained in:
Sunny Goyal
2022-05-25 22:24:04 +00:00
committed by Android (Google) Code Review

View File

@@ -75,6 +75,13 @@ public class SurfaceTransactionApplier extends ReleaseCheck {
if (view == null) {
return;
}
Transaction t = new Transaction();
for (int i = params.length - 1; i >= 0; i--) {
SurfaceParams surfaceParams = params[i];
if (surfaceParams.surface.isValid()) {
surfaceParams.applyTo(t);
}
}
mLastSequenceNumber++;
final int toApplySeqNo = mLastSequenceNumber;
@@ -85,13 +92,6 @@ public class SurfaceTransactionApplier extends ReleaseCheck {
.sendToTarget();
return;
}
Transaction t = new Transaction();
for (int i = params.length - 1; i >= 0; i--) {
SurfaceParams surfaceParams = params[i];
if (surfaceParams.surface.isValid()) {
surfaceParams.applyTo(t);
}
}
mTargetViewRootImpl.mergeWithNextTransaction(t, frame);
Message.obtain(mApplyHandler, MSG_UPDATE_SEQUENCE_NUMBER, toApplySeqNo, 0)
.sendToTarget();