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

Commit 3c18744b authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge "Fix acquire and framenumber mismatch in transaction complete callback" into sc-dev

parents f07a9853 935590e6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -461,6 +461,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
@@ -632,8 +633,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();