summaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-07-04 09:58:37 +0200
committerVaxry <43317083+vaxerski@users.noreply.github.com>2025-07-07 18:09:34 +0200
commitbb958a9e139d6ae90d45fe360287d33e229f971e (patch)
treebbfe8a1ac10a83ce18291d9deaafa4f98bc9d355 /src/debug
parentc75f85098cfdd53744a30ea5dce24b3fd43bd9c1 (diff)
pass: overload TexPass constructor
overload it with a rvalue to allow us to move the data directly avoiding an extra copy. because SRenderData is not trivially copyable.
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/HyprDebugOverlay.cpp2
-rw-r--r--src/debug/HyprNotificationOverlay.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/debug/HyprDebugOverlay.cpp b/src/debug/HyprDebugOverlay.cpp
index 45b11de9..8f79f2fe 100644
--- a/src/debug/HyprDebugOverlay.cpp
+++ b/src/debug/HyprDebugOverlay.cpp
@@ -271,5 +271,5 @@ void CHyprDebugOverlay::draw() {
CTexPassElement::SRenderData data;
data.tex = m_texture;
data.box = {0, 0, PMONITOR->m_pixelSize.x, PMONITOR->m_pixelSize.y};
- g_pHyprRenderer->m_renderPass.add(makeShared<CTexPassElement>(data));
+ g_pHyprRenderer->m_renderPass.add(makeShared<CTexPassElement>(std::move(data)));
}
diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp
index 05a13da4..68f5e356 100644
--- a/src/debug/HyprNotificationOverlay.cpp
+++ b/src/debug/HyprNotificationOverlay.cpp
@@ -248,7 +248,7 @@ void CHyprNotificationOverlay::draw(PHLMONITOR pMonitor) {
data.box = {0, 0, MONSIZE.x, MONSIZE.y};
data.a = 1.F;
- g_pHyprRenderer->m_renderPass.add(makeShared<CTexPassElement>(data));
+ g_pHyprRenderer->m_renderPass.add(makeShared<CTexPassElement>(std::move(data)));
}
bool CHyprNotificationOverlay::hasAny() {