summaryrefslogtreecommitdiff
path: root/src/protocols/core
diff options
context:
space:
mode:
authordavc0n <dconti.dev@gmail.com>2025-05-03 18:54:50 +0200
committerGitHub <noreply@github.com>2025-05-03 18:54:50 +0200
commit46ac115bd19ee3aff5c816033de0b1d55a74e33f (patch)
treea731c290e62451d026c809b5bdd22c8034488208 /src/protocols/core
parent3465efcdc1d15402ca23e7ce609905c5814fb9ee (diff)
protocols: refactor class member vars (types) (#10261)
Diffstat (limited to 'src/protocols/core')
-rw-r--r--src/protocols/core/Compositor.cpp12
-rw-r--r--src/protocols/core/DataDevice.cpp6
-rw-r--r--src/protocols/core/Shm.cpp10
3 files changed, 14 insertions, 14 deletions
diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp
index df1916ef..e6390dbf 100644
--- a/src/protocols/core/Compositor.cpp
+++ b/src/protocols/core/Compositor.cpp
@@ -82,11 +82,11 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : m_resource(re
auto buf = buffer ? CWLBufferResource::fromResource(buffer) : nullptr;
- if (buf && buf->buffer) {
- m_pending.buffer = CHLBufferReference(buf->buffer.lock());
- m_pending.texture = buf->buffer->texture;
- m_pending.size = buf->buffer->size;
- m_pending.bufferSize = buf->buffer->size;
+ if (buf && buf->m_buffer) {
+ m_pending.buffer = CHLBufferReference(buf->m_buffer.lock());
+ m_pending.texture = buf->m_buffer->m_texture;
+ m_pending.size = buf->m_buffer->size;
+ m_pending.bufferSize = buf->m_buffer->size;
} else {
m_pending.buffer = {};
m_pending.texture.reset();
@@ -157,7 +157,7 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : m_resource(re
whenReadable();
} else if (state->buffer->type() == Aquamarine::BUFFER_TYPE_DMABUF && state->buffer->dmabuf().success) {
// async buffer and is dmabuf, then we can wait on implicit fences
- auto syncFd = dynamic_cast<CDMABuffer*>(state->buffer.buffer.get())->exportSyncFile();
+ auto syncFd = dynamic_cast<CDMABuffer*>(state->buffer.m_buffer.get())->exportSyncFile();
if (syncFd.isValid())
g_pEventLoopManager->doOnReadable(std::move(syncFd), whenReadable);
diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp
index a54ae7e1..63523cd9 100644
--- a/src/protocols/core/DataDevice.cpp
+++ b/src/protocols/core/DataDevice.cpp
@@ -134,12 +134,12 @@ CWLDataSourceResource::CWLDataSourceResource(SP<CWlDataSource> resource_, SP<CWL
m_resource->setData(this);
m_resource->setDestroy([this](CWlDataSource* r) {
- events.destroy.emit();
+ m_events.destroy.emit();
PROTO::data->onDestroyDataSource(m_self);
PROTO::data->destroyResource(this);
});
m_resource->setOnDestroy([this](CWlDataSource* r) {
- events.destroy.emit();
+ m_events.destroy.emit();
PROTO::data->onDestroyDataSource(m_self);
PROTO::data->destroyResource(this);
});
@@ -152,7 +152,7 @@ CWLDataSourceResource::CWLDataSourceResource(SP<CWlDataSource> resource_, SP<CWL
}
CWLDataSourceResource::~CWLDataSourceResource() {
- events.destroy.emit();
+ m_events.destroy.emit();
PROTO::data->onDestroyDataSource(m_self);
}
diff --git a/src/protocols/core/Shm.cpp b/src/protocols/core/Shm.cpp
index 6ebfa64f..228884b9 100644
--- a/src/protocols/core/Shm.cpp
+++ b/src/protocols/core/Shm.cpp
@@ -20,9 +20,9 @@ CWLSHMBuffer::CWLSHMBuffer(SP<CWLSHMPoolResource> pool_, uint32_t id, int32_t of
m_stride = stride_;
m_fmt = fmt_;
m_offset = offset_;
- opaque = NFormatUtils::isFormatOpaque(NFormatUtils::shmToDRM(fmt_));
+ m_opaque = NFormatUtils::isFormatOpaque(NFormatUtils::shmToDRM(fmt_));
- resource = CWLBufferResource::create(makeShared<CWlBuffer>(pool_->m_resource->client(), 1, id));
+ m_resource = CWLBufferResource::create(makeShared<CWlBuffer>(pool_->m_resource->client(), 1, id));
m_listeners.bufferResourceDestroy = events.destroy.registerListener([this](std::any d) {
m_listeners.bufferResourceDestroy.reset();
@@ -31,8 +31,8 @@ CWLSHMBuffer::CWLSHMBuffer(SP<CWLSHMPoolResource> pool_, uint32_t id, int32_t of
}
CWLSHMBuffer::~CWLSHMBuffer() {
- if (resource)
- resource->sendRelease();
+ if (m_resource)
+ m_resource->sendRelease();
}
Aquamarine::eBufferCapability CWLSHMBuffer::caps() {
@@ -156,7 +156,7 @@ CWLSHMPoolResource::CWLSHMPoolResource(SP<CWlShmPool> resource_, CFileDescriptor
}
// append instance so that buffer knows its owner
- RESOURCE->resource->buffer = RESOURCE;
+ RESOURCE->m_resource->m_buffer = RESOURCE;
});
if UNLIKELY (m_pool->m_data == MAP_FAILED)