Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 935590e6 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Fix acquire and framenumber mismatch in transaction complete callback

Test: manual test with frame metrics cls
Test: frametimeline tests to follow
Change-Id: Idb51ce8f3f5d58391ab864f41d1b01031e2b0aac
parent a9b9fe40
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -452,6 +452,7 @@ bool BufferStateLayer::setTransactionCompletedListeners(
        if (willPresent) {
            // If this transaction set an acquire fence on this layer, set its acquire time
            handle->acquireTime = mCallbackHandleAcquireTime;
            handle->frameNumber = mCurrentState.frameNumber;

            // Notify the transaction completed thread that there is a pending latched callback
            // handle
@@ -623,8 +624,9 @@ status_t BufferStateLayer::updateTexImage(bool& /*recomputeVisibleRegions*/, nse
    }

    for (auto& handle : mDrawingState.callbackHandles) {
        if (handle->frameNumber == mDrawingState.frameNumber) {
            handle->latchTime = latchTime;
        handle->frameNumber = mDrawingState.frameNumber;
        }
    }

    const int32_t layerId = getSequence();