summaryrefslogtreecommitdiff
path: root/src/protocols/Screencopy.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-07-31 16:23:09 +0200
committerGitHub <noreply@github.com>2025-07-31 16:23:09 +0200
commita907ecd4ff736a3a09410532b405a437eb48033c (patch)
tree6e7ed001c06f224245ecf9c5e0c8206d6acd408f /src/protocols/Screencopy.cpp
parent3e35797b18d35baae82657bb0438af88156e273f (diff)
opengl: improve render fn arg clarity (#11286)
Diffstat (limited to 'src/protocols/Screencopy.cpp')
-rw-r--r--src/protocols/Screencopy.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp
index e98b216d..ddbb371a 100644
--- a/src/protocols/Screencopy.cpp
+++ b/src/protocols/Screencopy.cpp
@@ -200,7 +200,7 @@ void CScreencopyFrame::renderMon() {
.transform(wlTransformToHyprutils(invertTransform(m_monitor->m_transform)), m_monitor->m_pixelSize.x, m_monitor->m_pixelSize.y);
g_pHyprOpenGL->pushMonitorTransformEnabled(true);
g_pHyprOpenGL->setRenderModifEnabled(false);
- g_pHyprOpenGL->renderTexture(TEXTURE, monbox, 1);
+ g_pHyprOpenGL->renderTexture(TEXTURE, monbox, {});
g_pHyprOpenGL->setRenderModifEnabled(true);
g_pHyprOpenGL->popMonitorTransformEnabled();
@@ -229,7 +229,7 @@ void CScreencopyFrame::renderMon() {
const auto rounding = dontRound ? 0 : w->rounding() * m_monitor->m_scale;
const auto roundingPower = dontRound ? 2.0f : w->roundingPower();
- g_pHyprOpenGL->renderRect(noScreenShareBox, Colors::BLACK, rounding, roundingPower);
+ g_pHyprOpenGL->renderRect(noScreenShareBox, Colors::BLACK, {.round = rounding, .roundingPower = roundingPower});
if (w->m_isX11 || !w->m_popupHead)
continue;
@@ -249,7 +249,7 @@ void CScreencopyFrame::renderMon() {
const auto surfBox = CBox{popupBaseOffset + popRel + localOff, size}.translate(-m_monitor->m_position).scale(m_monitor->m_scale).translate(-m_box.pos());
if LIKELY (surfBox.w > 0 && surfBox.h > 0)
- g_pHyprOpenGL->renderRect(surfBox, Colors::BLACK);
+ g_pHyprOpenGL->renderRect(surfBox, Colors::BLACK, {});
},
nullptr);
},
@@ -292,7 +292,7 @@ void CScreencopyFrame::copyDmabuf(std::function<void(bool)> callback) {
if (PERM == PERMISSION_RULE_ALLOW_MODE_ALLOW) {
if (m_tempFb.isAllocated()) {
CBox texbox = {{}, m_box.size()};
- g_pHyprOpenGL->renderTexture(m_tempFb.getTexture(), texbox, 1);
+ g_pHyprOpenGL->renderTexture(m_tempFb.getTexture(), texbox, {});
m_tempFb.release();
} else
renderMon();
@@ -301,7 +301,7 @@ void CScreencopyFrame::copyDmabuf(std::function<void(bool)> callback) {
else {
g_pHyprOpenGL->clear(Colors::BLACK);
CBox texbox = CBox{m_monitor->m_transformedSize / 2.F, g_pHyprOpenGL->m_screencopyDeniedTexture->m_size}.translate(-g_pHyprOpenGL->m_screencopyDeniedTexture->m_size / 2.F);
- g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_screencopyDeniedTexture, texbox, 1);
+ g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_screencopyDeniedTexture, texbox, {});
}
g_pHyprOpenGL->m_renderData.blockScreenShader = true;
@@ -333,7 +333,7 @@ bool CScreencopyFrame::copyShm() {
if (PERM == PERMISSION_RULE_ALLOW_MODE_ALLOW) {
if (m_tempFb.isAllocated()) {
CBox texbox = {{}, m_box.size()};
- g_pHyprOpenGL->renderTexture(m_tempFb.getTexture(), texbox, 1);
+ g_pHyprOpenGL->renderTexture(m_tempFb.getTexture(), texbox, {});
m_tempFb.release();
} else
renderMon();
@@ -342,7 +342,7 @@ bool CScreencopyFrame::copyShm() {
else {
g_pHyprOpenGL->clear(Colors::BLACK);
CBox texbox = CBox{m_monitor->m_transformedSize / 2.F, g_pHyprOpenGL->m_screencopyDeniedTexture->m_size}.translate(-g_pHyprOpenGL->m_screencopyDeniedTexture->m_size / 2.F);
- g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_screencopyDeniedTexture, texbox, 1);
+ g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_screencopyDeniedTexture, texbox, {});
}
glBindFramebuffer(GL_READ_FRAMEBUFFER, fb.getFBID());