From f10b9044af6604542a567c8cf6848e8c0fbbfa4d Mon Sep 17 00:00:00 2001 From: chaviw Date: Wed, 13 Oct 2021 15:48:59 -0500 Subject: Remove setTransactionCompleteCallback The transaction complete callback is no longer used so delete the code Test: BLASTBufferQueueTest Bug: 200285149 Change-Id: I91c49de3a68fed3fe8261555852b1ca6d7aad546 --- libs/gui/BLASTBufferQueue.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'libs/gui/BLASTBufferQueue.cpp') diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp index 2d2b6b26f6..703360fb23 100644 --- a/libs/gui/BLASTBufferQueue.cpp +++ b/libs/gui/BLASTBufferQueue.cpp @@ -319,9 +319,6 @@ static void transactionCallbackThunk(void* context, nsecs_t latchTime, void BLASTBufferQueue::transactionCallback(nsecs_t /*latchTime*/, const sp& /*presentFence*/, const std::vector& stats) { - std::function transactionCompleteCallback = nullptr; - uint64_t currFrameNumber = 0; - { std::unique_lock _lock{mMutex}; ATRACE_CALL(); @@ -348,18 +345,6 @@ void BLASTBufferQueue::transactionCallback(nsecs_t /*latchTime*/, const sp= mTransactionCompleteFrameNumber) { - if (currFrameNumber > mTransactionCompleteFrameNumber) { - BQA_LOGE("transactionCallback received for a newer framenumber=%" PRIu64 - " than expected=%" PRIu64, - currFrameNumber, mTransactionCompleteFrameNumber); - } - transactionCompleteCallback = std::move(mTransactionCompleteCallback); - mTransactionCompleteFrameNumber = 0; - } } else { BQA_LOGE("Failed to find matching SurfaceControl in transaction callback"); } @@ -370,10 +355,6 @@ void BLASTBufferQueue::transactionCallback(nsecs_t /*latchTime*/, const sp&& transactionCompleteCallback) { - std::lock_guard _lock{mMutex}; - if (transactionCompleteCallback == nullptr) { - mTransactionCompleteCallback = nullptr; - } else { - mTransactionCompleteCallback = std::move(transactionCompleteCallback); - mTransactionCompleteFrameNumber = frameNumber; - } -} - // Check if we have acquired the maximum number of buffers. // Consumer can acquire an additional buffer if that buffer is not droppable. Set // includeExtraAcquire is true to include this buffer to the count. Since this depends on the state -- cgit v1.2.3-59-g8ed1b