buffer: track asynchronous buffers and don't release them until unref

synchronous buffers are read instantly and we can release them, but asynchronous ones have to be locked until they are unref'd from .current to avoid reading from a buffer after .release()
This commit is contained in:
Vaxry 2024-06-08 17:27:50 +02:00
parent d724556b7e
commit 9994b73ad0
6 changed files with 23 additions and 4 deletions

View file

@ -37,6 +37,7 @@ class CWLSHMBuffer : public IWLBuffer {
virtual eBufferCapability caps();
virtual eBufferType type();
virtual void update(const CRegion& damage);
virtual bool isSynchronous();
virtual SSHMAttrs shm();
virtual std::tuple<uint8_t*, uint32_t, size_t> beginDataPtr(uint32_t flags);
virtual void endDataPtr();