summaryrefslogtreecommitdiff
path: root/src/protocols/Screencopy.cpp
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/Screencopy.cpp
parent3465efcdc1d15402ca23e7ce609905c5814fb9ee (diff)
protocols: refactor class member vars (types) (#10261)
Diffstat (limited to 'src/protocols/Screencopy.cpp')
-rw-r--r--src/protocols/Screencopy.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp
index 4539a463..391d13e7 100644
--- a/src/protocols/Screencopy.cpp
+++ b/src/protocols/Screencopy.cpp
@@ -100,7 +100,7 @@ void CScreencopyFrame::copy(CZwlrScreencopyFrameV1* pFrame, wl_resource* buffer_
return;
}
- if UNLIKELY (PBUFFER->buffer->size != box.size()) {
+ if UNLIKELY (PBUFFER->m_buffer->size != box.size()) {
LOGM(ERR, "Invalid dimensions in {:x}", (uintptr_t)this);
resource->error(ZWLR_SCREENCOPY_FRAME_V1_ERROR_INVALID_BUFFER, "invalid buffer dimensions");
PROTO::screencopy->destroyResource(this);
@@ -114,7 +114,7 @@ void CScreencopyFrame::copy(CZwlrScreencopyFrameV1* pFrame, wl_resource* buffer_
return;
}
- if (auto attrs = PBUFFER->buffer->dmabuf(); attrs.success) {
+ if (auto attrs = PBUFFER->m_buffer->dmabuf(); attrs.success) {
bufferDMA = true;
if (attrs.format != dmabufFormat) {
@@ -123,7 +123,7 @@ void CScreencopyFrame::copy(CZwlrScreencopyFrameV1* pFrame, wl_resource* buffer_
PROTO::screencopy->destroyResource(this);
return;
}
- } else if (auto attrs = PBUFFER->buffer->shm(); attrs.success) {
+ } else if (auto attrs = PBUFFER->m_buffer->shm(); attrs.success) {
if (attrs.format != shmFormat) {
LOGM(ERR, "Invalid buffer shm format in {:x}", (uintptr_t)pFrame);
resource->error(ZWLR_SCREENCOPY_FRAME_V1_ERROR_INVALID_BUFFER, "invalid buffer format");
@@ -142,7 +142,7 @@ void CScreencopyFrame::copy(CZwlrScreencopyFrameV1* pFrame, wl_resource* buffer_
return;
}
- buffer = CHLBufferReference(PBUFFER->buffer.lock());
+ buffer = CHLBufferReference(PBUFFER->m_buffer.lock());
PROTO::screencopy->m_vFramesAwaitingWrite.emplace_back(self);
@@ -193,7 +193,7 @@ void CScreencopyFrame::copyDmabuf(std::function<void(bool)> callback) {
CRegion fakeDamage = {0, 0, INT16_MAX, INT16_MAX};
- if (!g_pHyprRenderer->beginRender(pMonitor.lock(), fakeDamage, RENDER_MODE_TO_BUFFER, buffer.buffer, nullptr, true)) {
+ if (!g_pHyprRenderer->beginRender(pMonitor.lock(), fakeDamage, RENDER_MODE_TO_BUFFER, buffer.m_buffer, nullptr, true)) {
LOGM(ERR, "Can't copy: failed to begin rendering to dma frame");
callback(false);
return;