protocols: refactor class member vars (core) (#10259)
This commit is contained in:
parent
0c736217a7
commit
d9cad5e1b6
57 changed files with 1160 additions and 1158 deletions
|
|
@ -23,9 +23,9 @@ class CSHMPool {
|
|||
CSHMPool(Hyprutils::OS::CFileDescriptor fd, size_t size);
|
||||
~CSHMPool();
|
||||
|
||||
Hyprutils::OS::CFileDescriptor fd;
|
||||
size_t size = 0;
|
||||
void* data = nullptr;
|
||||
Hyprutils::OS::CFileDescriptor m_fd;
|
||||
size_t m_size = 0;
|
||||
void* m_data = nullptr;
|
||||
|
||||
void resize(size_t size);
|
||||
};
|
||||
|
|
@ -45,14 +45,15 @@ class CWLSHMBuffer : public IHLBuffer {
|
|||
|
||||
bool good();
|
||||
|
||||
int32_t offset = 0, stride = 0;
|
||||
uint32_t fmt = 0;
|
||||
SP<CSHMPool> pool;
|
||||
int32_t m_offset = 0;
|
||||
int32_t m_stride = 0;
|
||||
uint32_t m_fmt = 0;
|
||||
SP<CSHMPool> m_pool;
|
||||
|
||||
private:
|
||||
struct {
|
||||
CHyprSignalListener bufferResourceDestroy;
|
||||
} listeners;
|
||||
} m_listeners;
|
||||
};
|
||||
|
||||
class CWLSHMPoolResource {
|
||||
|
|
@ -61,12 +62,12 @@ class CWLSHMPoolResource {
|
|||
|
||||
bool good();
|
||||
|
||||
SP<CSHMPool> pool;
|
||||
SP<CSHMPool> m_pool;
|
||||
|
||||
WP<CWLSHMPoolResource> self;
|
||||
WP<CWLSHMPoolResource> m_self;
|
||||
|
||||
private:
|
||||
SP<CWlShmPool> resource;
|
||||
SP<CWlShmPool> m_resource;
|
||||
|
||||
friend class CWLSHMBuffer;
|
||||
};
|
||||
|
|
@ -78,7 +79,7 @@ class CWLSHMResource {
|
|||
bool good();
|
||||
|
||||
private:
|
||||
SP<CWlShm> resource;
|
||||
SP<CWlShm> m_resource;
|
||||
};
|
||||
|
||||
class CWLSHMProtocol : public IWaylandProtocol {
|
||||
|
|
@ -93,12 +94,12 @@ class CWLSHMProtocol : public IWaylandProtocol {
|
|||
void destroyResource(CWLSHMBuffer* resource);
|
||||
|
||||
//
|
||||
std::vector<SP<CWLSHMResource>> m_vManagers;
|
||||
std::vector<SP<CWLSHMPoolResource>> m_vPools;
|
||||
std::vector<SP<CWLSHMBuffer>> m_vBuffers;
|
||||
std::vector<SP<CWLSHMResource>> m_managers;
|
||||
std::vector<SP<CWLSHMPoolResource>> m_pools;
|
||||
std::vector<SP<CWLSHMBuffer>> m_buffers;
|
||||
|
||||
//
|
||||
std::vector<uint32_t> shmFormats;
|
||||
std::vector<uint32_t> m_shmFormats;
|
||||
|
||||
friend class CWLSHMResource;
|
||||
friend class CWLSHMPoolResource;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue