summaryrefslogtreecommitdiff
path: root/libs/gui/BLASTBufferQueue.cpp
diff options
context:
space:
mode:
author Chavi Weingarten <chaviw@google.com> 2021-10-20 17:36:10 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-10-20 17:36:10 +0000
commit4497fa8b12634ccf6b3cd716ca0ed5c0294ad761 (patch)
treea20df944d6d81c8e726c4a04b0f8534fca4605e6 /libs/gui/BLASTBufferQueue.cpp
parentaeb0255b69736449471b0c88a99df29b255a965b (diff)
parentf10b9044af6604542a567c8cf6848e8c0fbbfa4d (diff)
Merge "Remove setTransactionCompleteCallback"
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
-rw-r--r--libs/gui/BLASTBufferQueue.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp
index dfbb8630c0..1ae90f34f5 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
@@ -698,17 +679,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