From d84085a2bab2019124cd5fd35dede59e39e5682f Mon Sep 17 00:00:00 2001 From: chaviw Date: Tue, 8 Feb 2022 11:07:04 -0600 Subject: Add gatherPendingTransactions in BBQ Add a function to gather the transactions that were sent to BBQ via the mergeWithNextTransaction. This is to allow the caller to get the transaction in case a frame isn't drawn and we need to apply or merge these transactions anyway. Test: Builds and runs Bug: 200284684 Change-Id: Ic9f3afb48e00212a6488a6a8f9cd4403ed1cb7d6 --- libs/gui/BLASTBufferQueue.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs/gui/BLASTBufferQueue.cpp') diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp index dd966837f4..6bcbea10d7 100644 --- a/libs/gui/BLASTBufferQueue.cpp +++ b/libs/gui/BLASTBufferQueue.cpp @@ -834,6 +834,14 @@ void BLASTBufferQueue::mergePendingTransactions(SurfaceComposerClient::Transacti mPendingTransactions.end()); } +SurfaceComposerClient::Transaction* BLASTBufferQueue::gatherPendingTransactions( + uint64_t frameNumber) { + std::lock_guard _lock{mMutex}; + SurfaceComposerClient::Transaction* t = new SurfaceComposerClient::Transaction(); + mergePendingTransactions(t, frameNumber); + return t; +} + // Maintains a single worker thread per process that services a list of runnables. class AsyncWorker : public Singleton { private: -- cgit v1.2.3-59-g8ed1b