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

Commit f90df630 authored by liulijun's avatar liulijun Committed by Ady Abraham
Browse files

Fix an arithmetic error when using unsigned



bug:259000034

Test: by partner
Signed-off-by: default avatarLiu <Lijun&lt;liulijun@xiaomi.corp-partner.google.com>
Change-Id: I7784f841c04123c99f28705ea6153208be3e383b
parent 2adb9ddf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -426,8 +426,8 @@ void BLASTBufferQueue::releaseBufferCallbackLocked(const ReleaseCallbackId& id,
        mCurrentMaxAcquiredBufferCount = *currentMaxAcquiredBufferCount;
    }

    const auto numPendingBuffersToHold =
            isEGL ? std::max(0u, mMaxAcquiredBuffers - mCurrentMaxAcquiredBufferCount) : 0;
    const uint32_t numPendingBuffersToHold =
            isEGL ? std::max(0, mMaxAcquiredBuffers - (int32_t)mCurrentMaxAcquiredBufferCount) : 0;

    auto rb = ReleasedBuffer{id, releaseFence};
    if (std::find(mPendingRelease.begin(), mPendingRelease.end(), rb) == mPendingRelease.end()) {