From 46ac115bd19ee3aff5c816033de0b1d55a74e33f Mon Sep 17 00:00:00 2001 From: davc0n Date: Sat, 3 May 2025 18:54:50 +0200 Subject: protocols: refactor class member vars (types) (#10261) --- src/protocols/Screencopy.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/protocols/Screencopy.cpp') 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 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; -- cgit v1.2.3