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

Commit 0bf07b11 authored by Sungtak Lee's avatar Sungtak Lee Committed by Cherrypicker Worker
Browse files

C2BqBuffer: Clear a cached buffer if reallocation is needed

If a cached buffer is required to be reallocated, clear the buffer in
the cache.
Bug: 240393739
Change-Id: I6db4a66039f0455c566e2ab009effc4a5b7f37be
(cherry picked from commit 0e212e87)
Merged-In: I6db4a66039f0455c566e2ab009effc4a5b7f37be
parent a7b927a7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -432,6 +432,10 @@ private:
        if (fence) {
            static constexpr int kFenceWaitTimeMs = 10;

            if (bufferNeedsReallocation) {
                mBuffers[slot].clear();
            }

            status_t status = fence->wait(kFenceWaitTimeMs);
            if (status == -ETIME) {
                // fence is not signalled yet.