summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/TransactionCallbackInvoker.cpp
diff options
context:
space:
mode:
author Patrick Williams <pdwilliams@google.com> 2024-08-29 15:32:27 +0000
committer Patrick Williams <pdwilliams@google.com> 2024-08-29 16:36:44 -0500
commit7a34bdcde80fbeb55b507cc7975b1f2a5125e562 (patch)
tree303a87c443955a22369350aa59c90aae1c532205 /services/surfaceflinger/TransactionCallbackInvoker.cpp
parent4fa6763aaa9e3bbce484ef09f28cfe2321e896be (diff)
Revert^2 "Read from BufferReleaseChannel in background thread"
This reverts commit 8af62f245bfc575a00f08db450067d172ef7c825. Reason for revert: The feature flag was enabled when this change was merged. I've disabled the feature flag so this change shouldn't cause issues. I'll add the missing SELinux permissions in AOSP. Change-Id: I9b07a854b0e0514d8036066f7b05a37a9701991b
Diffstat (limited to 'services/surfaceflinger/TransactionCallbackInvoker.cpp')
-rw-r--r--services/surfaceflinger/TransactionCallbackInvoker.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/services/surfaceflinger/TransactionCallbackInvoker.cpp b/services/surfaceflinger/TransactionCallbackInvoker.cpp
index 881bf35b58..c6856aea75 100644
--- a/services/surfaceflinger/TransactionCallbackInvoker.cpp
+++ b/services/surfaceflinger/TransactionCallbackInvoker.cpp
@@ -149,6 +149,13 @@ status_t TransactionCallbackInvoker::addCallbackHandle(const sp<CallbackHandle>&
handle->transformHint,
handle->currentMaxAcquiredBufferCount,
eventStats, handle->previousReleaseCallbackId);
+ if (handle->bufferReleaseChannel &&
+ handle->previousReleaseCallbackId != ReleaseCallbackId::INVALID_ID) {
+ mBufferReleases.emplace_back(handle->bufferReleaseChannel,
+ handle->previousReleaseCallbackId,
+ handle->previousReleaseFence,
+ handle->currentMaxAcquiredBufferCount);
+ }
}
return NO_ERROR;
}
@@ -158,6 +165,12 @@ void TransactionCallbackInvoker::addPresentFence(sp<Fence> presentFence) {
}
void TransactionCallbackInvoker::sendCallbacks(bool onCommitOnly) {
+ for (const auto& bufferRelease : mBufferReleases) {
+ bufferRelease.channel->writeReleaseFence(bufferRelease.callbackId, bufferRelease.fence,
+ bufferRelease.currentMaxAcquiredBufferCount);
+ }
+ mBufferReleases.clear();
+
// For each listener
auto completedTransactionsItr = mCompletedTransactions.begin();
ftl::SmallVector<ListenerStats, 10> listenerStatsToSend;