diff options
| author | 2021-10-13 15:48:59 -0500 | |
|---|---|---|
| committer | 2021-10-14 12:21:57 -0500 | |
| commit | f10b9044af6604542a567c8cf6848e8c0fbbfa4d (patch) | |
| tree | b5211f9cb5beaa8dfdf3cae19cc080202ead6cde /libs/gui/BLASTBufferQueue.cpp | |
| parent | 3ef0b97f2805a13f32051b87c5d723300b38bf66 (diff) | |
Remove setTransactionCompleteCallback
The transaction complete callback is no longer used so delete the code
Test: BLASTBufferQueueTest
Bug: 200285149
Change-Id: I91c49de3a68fed3fe8261555852b1ca6d7aad546
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
| -rw-r--r-- | libs/gui/BLASTBufferQueue.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
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<Fence>& /*presentFence*/, const std::vector<SurfaceControlStats>& stats) { - std::function<void(int64_t)> 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<Fence stat.latchTime, stat.frameEventStats.dequeueReadyTime); } - currFrameNumber = stat.frameEventStats.frameNumber; - - if (mTransactionCompleteCallback && - currFrameNumber >= 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<Fence decStrong((void*)transactionCallbackThunk); } - - if (transactionCompleteCallback) { - transactionCompleteCallback(currFrameNumber); - } } // Unlike transactionCallbackThunk the release buffer callback does not extend the life of the @@ -692,17 +673,6 @@ bool BLASTBufferQueue::rejectBuffer(const BufferItem& item) { return mSize != bufferSize; } -void BLASTBufferQueue::setTransactionCompleteCallback( - uint64_t frameNumber, std::function<void(int64_t)>&& 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 |