diff options
author | 2024-08-30 10:24:28 +0000 | |
---|---|---|
committer | 2024-08-30 10:24:28 +0000 | |
commit | 2b84a2e28aa8acad97b2d6d83de2d602cffa9547 (patch) | |
tree | 97b03e2bbc33d21b94fcdeb5a34e442bfc81914d /services/surfaceflinger/Layer.cpp | |
parent | 629686cd092a6ab80402101c91f2cf80a5e11142 (diff) | |
parent | 4aface1c7583f8593ad40534f65218c590bd419e (diff) |
Merge "Revert^3 "Read from BufferReleaseChannel in background thread"" into main
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 23 |
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; } |