Merge "Copy transaction in applyTransactionOnDraw" into udc-dev

This commit is contained in:
Patrick Williams
2023-03-22 17:39:55 +00:00
committed by Android (Google) Code Review

View File

@@ -11365,9 +11365,13 @@ public final class ViewRootImpl implements ViewParent,
if (mRemoved || !isHardwareEnabled()) {
t.apply();
} else {
// Copy and clear the passed in transaction for thread safety. The new transaction is
// accessed on the render thread.
var localTransaction = new Transaction();
localTransaction.merge(t);
mHasPendingTransactions = true;
registerRtFrameCallback(frame -> {
mergeWithNextTransaction(t, frame);
mergeWithNextTransaction(localTransaction, frame);
});
}
return true;