summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 3c8af19015..7b12a807c9 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1951,24 +1951,15 @@ bool Layer::setDropInputMode(gui::DropInputMode mode) {
void Layer::callReleaseBufferCallback(const sp<ITransactionCompletedListener>& listener,
const sp<GraphicBuffer>& buffer, uint64_t framenumber,
const sp<Fence>& releaseFence) {
- if (!listener && !mBufferReleaseChannel) {
+ if (!listener) {
return;
}
-
SFTRACE_FORMAT_INSTANT("callReleaseBufferCallback %s - %" PRIu64, getDebugName(), framenumber);
-
- ReleaseCallbackId callbackId{buffer->getId(), framenumber};
- const sp<Fence>& fence = releaseFence ? releaseFence : Fence::NO_FENCE;
uint32_t currentMaxAcquiredBufferCount =
mFlinger->getMaxAcquiredBufferCountForCurrentRefreshRate(mOwnerUid);
-
- if (listener) {
- listener->onReleaseBuffer(callbackId, fence, currentMaxAcquiredBufferCount);
- }
-
- if (mBufferReleaseChannel) {
- mBufferReleaseChannel->writeReleaseFence(callbackId, fence, currentMaxAcquiredBufferCount);
- }
+ listener->onReleaseBuffer({buffer->getId(), framenumber},
+ releaseFence ? releaseFence : Fence::NO_FENCE,
+ currentMaxAcquiredBufferCount);
}
sp<CallbackHandle> Layer::findCallbackHandle() {
@@ -2086,7 +2077,6 @@ void Layer::onLayerDisplayed(ftl::SharedFuture<FenceResult> futureFenceResult,
void Layer::releasePendingBuffer(nsecs_t dequeueReadyTime) {
for (const auto& handle : mDrawingState.callbackHandles) {
- handle->bufferReleaseChannel = mBufferReleaseChannel;
handle->transformHint = mTransformHint;
handle->dequeueReadyTime = dequeueReadyTime;
handle->currentMaxAcquiredBufferCount =
@@ -3518,11 +3508,6 @@ bool Layer::setTrustedPresentationInfo(TrustedPresentationThresholds const& thre
return haveTrustedPresentationListener;
}
-void Layer::setBufferReleaseChannel(
- const std::shared_ptr<gui::BufferReleaseChannel::ProducerEndpoint>& channel) {
- mBufferReleaseChannel = channel;
-}
-
void Layer::updateLastLatchTime(nsecs_t latchTime) {
mLastLatchTime = latchTime;
}