From 7345cbbf4daa74522481a12b52ab36156fe3fb8b Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Mon, 9 Dec 2024 20:01:47 +0000 Subject: Apply merged transactions using the BBQ apply token This avoids any possibilities of transactions being applied out of order. Flag: EXEMPT bug fix Bug: 362400679 Test: presubmit Change-Id: Id5d2ae7076c4007390f0b8aadf9587ca4301323b --- libs/gui/BLASTBufferQueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/gui/BLASTBufferQueue.cpp') diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp index fdc39ed765..531928067b 100644 --- a/libs/gui/BLASTBufferQueue.cpp +++ b/libs/gui/BLASTBufferQueue.cpp @@ -1021,7 +1021,7 @@ void BLASTBufferQueue::mergeWithNextTransaction(SurfaceComposerClient::Transacti std::lock_guard _lock{mMutex}; if (mLastAcquiredFrameNumber >= frameNumber) { // Apply the transaction since we have already acquired the desired frame. - t->apply(); + t->setApplyToken(mApplyToken).apply(); } else { mPendingTransactions.emplace_back(frameNumber, *t); // Clear the transaction so it can't be applied elsewhere. -- cgit v1.2.3-59-g8ed1b