summaryrefslogtreecommitdiff
path: root/src/render/pass
diff options
context:
space:
mode:
authordavc0n <dconti.dev@gmail.com>2025-05-03 16:02:49 +0200
committerGitHub <noreply@github.com>2025-05-03 16:02:49 +0200
commitd9cad5e1b63f2e1e86eb54551c72d17ee4dd070d (patch)
tree8238b613480214eaf91fc85343d25503bafa51c3 /src/render/pass
parent0c736217a787928a87224b2bf7e984c446d4fc22 (diff)
protocols: refactor class member vars (core) (#10259)
Diffstat (limited to 'src/render/pass')
-rw-r--r--src/render/pass/Pass.cpp6
-rw-r--r--src/render/pass/SurfacePassElement.cpp22
2 files changed, 14 insertions, 14 deletions
diff --git a/src/render/pass/Pass.cpp b/src/render/pass/Pass.cpp
index 8897be33..925a30b4 100644
--- a/src/render/pass/Pass.cpp
+++ b/src/render/pass/Pass.cpp
@@ -244,13 +244,13 @@ void CRenderPass::renderDebugData() {
renderHLSurface(debugData.lastWindowText, g_pCompositor->m_lastWindow->m_wlSurface->resource(), Colors::LIGHT_BLUE.modifyA(0.1F));
if (g_pSeatManager->m_state.pointerFocus) {
- if (g_pSeatManager->m_state.pointerFocus->current.input.intersect(CBox{{}, g_pSeatManager->m_state.pointerFocus->current.size}).getExtents().size() !=
- g_pSeatManager->m_state.pointerFocus->current.size) {
+ if (g_pSeatManager->m_state.pointerFocus->m_current.input.intersect(CBox{{}, g_pSeatManager->m_state.pointerFocus->m_current.size}).getExtents().size() !=
+ g_pSeatManager->m_state.pointerFocus->m_current.size) {
auto hlSurface = CWLSurface::fromResource(g_pSeatManager->m_state.pointerFocus.lock());
if (hlSurface) {
auto BOX = hlSurface->getSurfaceBoxGlobal();
if (BOX) {
- auto region = g_pSeatManager->m_state.pointerFocus->current.input.copy()
+ auto region = g_pSeatManager->m_state.pointerFocus->m_current.input.copy()
.scale(g_pHyprOpenGL->m_RenderData.pMonitor->m_scale)
.translate(BOX->pos() - g_pHyprOpenGL->m_RenderData.pMonitor->m_position);
g_pHyprOpenGL->renderRectWithDamage(box, CHyprColor{0.8F, 0.8F, 0.2F, 0.4F}, region);
diff --git a/src/render/pass/SurfacePassElement.cpp b/src/render/pass/SurfacePassElement.cpp
index 3813e714..ade9277c 100644
--- a/src/render/pass/SurfacePassElement.cpp
+++ b/src/render/pass/SurfacePassElement.cpp
@@ -72,12 +72,12 @@ void CSurfacePassElement::draw(const CRegion& damage) {
return;
}
- const bool MISALIGNEDFSV1 = std::floor(data.pMonitor->m_scale) != data.pMonitor->m_scale /* Fractional */ && data.surface->current.scale == 1 /* fs protocol */ &&
- windowBox.size() != data.surface->current.bufferSize /* misaligned */ && DELTALESSTHAN(windowBox.width, data.surface->current.bufferSize.x, 3) &&
- DELTALESSTHAN(windowBox.height, data.surface->current.bufferSize.y, 3) /* off by one-or-two */ &&
+ const bool MISALIGNEDFSV1 = std::floor(data.pMonitor->m_scale) != data.pMonitor->m_scale /* Fractional */ && data.surface->m_current.scale == 1 /* fs protocol */ &&
+ windowBox.size() != data.surface->m_current.bufferSize /* misaligned */ && DELTALESSTHAN(windowBox.width, data.surface->m_current.bufferSize.x, 3) &&
+ DELTALESSTHAN(windowBox.height, data.surface->m_current.bufferSize.y, 3) /* off by one-or-two */ &&
(!data.pWindow || (!data.pWindow->m_realSize->isBeingAnimated() && !INTERACTIVERESIZEINPROGRESS)) /* not window or not animated/resizing */;
- if (data.surface->colorManagement.valid())
+ if (data.surface->m_colorManagement.valid())
Debug::log(TRACE, "FIXME: rendering surface with color management enabled, should apply necessary transformations");
g_pHyprRenderer->calculateUVForSurface(data.pWindow, data.surface, data.pMonitor->m_self.lock(), data.mainSurface, windowBox.size(), PROJSIZEUNSCALED, MISALIGNEDFSV1);
@@ -131,8 +131,8 @@ void CSurfacePassElement::draw(const CRegion& damage) {
// add async (dmabuf) buffers to usedBuffers so we can handle release later
// sync (shm) buffers will be released in commitState, so no need to track them here
- if (data.surface->current.buffer && !data.surface->current.buffer->isSynchronous())
- g_pHyprRenderer->usedAsyncBuffers.emplace_back(data.surface->current.buffer);
+ if (data.surface->m_current.buffer && !data.surface->m_current.buffer->isSynchronous())
+ g_pHyprRenderer->usedAsyncBuffers.emplace_back(data.surface->m_current.buffer);
g_pHyprOpenGL->blend(true);
}
@@ -167,8 +167,8 @@ CBox CSurfacePassElement::getTexBox() {
}
} else { // here we clamp to 2, these might be some tiny specks
- windowBox = {(int)outputX + data.pos.x + data.localPos.x, (int)outputY + data.pos.y + data.localPos.y, std::max((float)data.surface->current.size.x, 2.F),
- std::max((float)data.surface->current.size.y, 2.F)};
+ windowBox = {(int)outputX + data.pos.x + data.localPos.x, (int)outputY + data.pos.y + data.localPos.y, std::max((float)data.surface->m_current.size.x, 2.F),
+ std::max((float)data.surface->m_current.size.y, 2.F)};
if (data.pWindow && data.pWindow->m_realSize->isBeingAnimated() && data.surface && !data.mainSurface && data.squishOversized /* subsurface */) {
// adjust subsurfaces to the window
windowBox.width = (windowBox.width / data.pWindow->m_reportedSize.x) * data.pWindow->m_realSize->value().x;
@@ -226,8 +226,8 @@ CRegion CSurfacePassElement::opaqueRegion() {
if (ALPHA < 1.F)
return {};
- if (data.surface && data.surface->current.size == Vector2D{data.w, data.h}) {
- CRegion opaqueSurf = data.surface->current.opaque.copy().intersect(CBox{{}, {data.w, data.h}});
+ if (data.surface && data.surface->m_current.size == Vector2D{data.w, data.h}) {
+ CRegion opaqueSurf = data.surface->m_current.opaque.copy().intersect(CBox{{}, {data.w, data.h}});
const auto texBox = getTexBox();
opaqueSurf.scale(texBox.size() / Vector2D{data.w, data.h});
return opaqueSurf.translate(data.pos + data.localPos - data.pMonitor->m_position).expand(-data.rounding);
@@ -241,7 +241,7 @@ CRegion CSurfacePassElement::visibleRegion(bool& cancel) {
if (!PSURFACE)
return {};
- const auto& bufferSize = data.surface->current.bufferSize;
+ const auto& bufferSize = data.surface->m_current.bufferSize;
auto visibleRegion = PSURFACE->m_visibleRegion.copy();
if (visibleRegion.empty())