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

Commit cd250c57 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Fix some issues with pending buffer traces"

parents b5ccb2ac df3c5e8b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -637,7 +637,10 @@ status_t BufferStateLayer::updateActiveBuffer() {
    if (s.buffer == nullptr) {
        return BAD_VALUE;
    }

    if (s.buffer != mBufferInfo.mBuffer) {
        decrementPendingBufferCount();
    }

    mPreviousBufferId = getCurrentBufferId();
    mBufferInfo.mBuffer = s.buffer;
+4 −2
Original line number Diff line number Diff line
@@ -3377,8 +3377,10 @@ status_t SurfaceFlinger::setTransactionState(
    const int originPid = ipc->getCallingPid();
    const int originUid = ipc->getCallingUid();

    if (pendingTransactions ||
        !transactionIsReadyToBeApplied(isAutoTimestamp ? 0 : desiredPresentTime, states, true)) {
    // Call transactionIsReadyToBeApplied first in case we need to incrementPendingBufferCount
    // if the transaction contains a buffer.
    if (!transactionIsReadyToBeApplied(isAutoTimestamp ? 0 : desiredPresentTime, states, true) ||
        pendingTransactions) {
        mTransactionQueues[applyToken].emplace(frameTimelineVsyncId, states, displays, flags,
                                               desiredPresentTime, isAutoTimestamp, uncacheBuffer,
                                               postTime, privileged, hasListenerCallbacks,