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

Commit 444cbbba authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "C2BqPool: Do not call cancelBuffer() after invalidated" into main

parents b2531368 912d7b02
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
#include <C2FenceFactory.h>
#include <C2SurfaceSyncObj.h>

#include <atomic>
#include <list>
#include <map>
#include <mutex>
@@ -753,8 +754,8 @@ public:
    }

    void invalidate() {
        std::scoped_lock<std::mutex> lock(mMutex);
        mInvalidated = true;
        mIgbpValidityToken.reset();
    }

private:
@@ -794,7 +795,7 @@ private:
    // if the token has been expired, the buffers will not call IGBP::cancelBuffer()
    // when they are no longer used.
    std::shared_ptr<int> mIgbpValidityToken;
    bool mInvalidated{false};
    std::atomic<bool> mInvalidated{false};
};

C2BufferQueueBlockPoolData::C2BufferQueueBlockPoolData(