summaryrefslogtreecommitdiff
path: root/src/render/pass
diff options
context:
space:
mode:
authorUjinT34 <41110182+UjinT34@users.noreply.github.com>2026-03-07 16:13:34 +0300
committerGitHub <noreply@github.com>2026-03-07 13:13:34 +0000
commit966f20d305345b3042dc1d37a1dd8833f3a4783b (patch)
tree3e8515b7a0f6fde7bf3137aac7124ae90e5951ec /src/render/pass
parent32e75e3e320fb66ab517a378df645f3d29b3a209 (diff)
renderer: refactor resources and flags (#13471)
Diffstat (limited to 'src/render/pass')
-rw-r--r--src/render/pass/Pass.cpp16
-rw-r--r--src/render/pass/SurfacePassElement.cpp4
-rw-r--r--src/render/pass/TextureMatteElement.cpp1
3 files changed, 10 insertions, 11 deletions
diff --git a/src/render/pass/Pass.cpp b/src/render/pass/Pass.cpp
index cfe8933a..357c02cd 100644
--- a/src/render/pass/Pass.cpp
+++ b/src/render/pass/Pass.cpp
@@ -138,9 +138,9 @@ CRegion CRenderPass::render(const CRegion& damage_) {
m_debugData = {false};
else if (*PDEBUGPASS && !m_debugData.present) {
m_debugData.present = true;
- m_debugData.keyboardFocusText = g_pHyprOpenGL->renderText("keyboard", Colors::WHITE, 12);
- m_debugData.pointerFocusText = g_pHyprOpenGL->renderText("pointer", Colors::WHITE, 12);
- m_debugData.lastWindowText = g_pHyprOpenGL->renderText("lastWindow", Colors::WHITE, 12);
+ m_debugData.keyboardFocusText = g_pHyprRenderer->renderText("keyboard", Colors::WHITE, 12);
+ m_debugData.pointerFocusText = g_pHyprRenderer->renderText("pointer", Colors::WHITE, 12);
+ m_debugData.lastWindowText = g_pHyprRenderer->renderText("lastWindow", Colors::WHITE, 12);
}
if (WILLBLUR && !*PDEBUGPASS) {
@@ -178,7 +178,7 @@ CRegion CRenderPass::render(const CRegion& damage_) {
} else
simplify();
- g_pHyprOpenGL->m_renderData.pCurrentMonData->blurFBShouldRender = std::ranges::any_of(m_passElements, [](const auto& el) { return el->element->needsPrecomputeBlur(); });
+ g_pHyprOpenGL->m_renderData.pMonitor->m_blurFBShouldRender = std::ranges::any_of(m_passElements, [](const auto& el) { return el->element->needsPrecomputeBlur(); });
if (m_passElements.empty())
return {};
@@ -272,9 +272,9 @@ void CRenderPass::renderDebugData() {
}
const auto DISCARDED_ELEMENTS = std::ranges::count_if(m_passElements, [](const auto& e) { return e->discard; });
- auto tex = g_pHyprOpenGL->renderText(std::format("occlusion layers: {}\npass elements: {} ({} discarded)\nviewport: {:X0}", m_occludedRegions.size(), m_passElements.size(),
- DISCARDED_ELEMENTS, g_pHyprOpenGL->m_renderData.pMonitor->m_pixelSize),
- Colors::WHITE, 12);
+ auto tex = g_pHyprRenderer->renderText(std::format("occlusion layers: {}\npass elements: {} ({} discarded)\nviewport: {:X0}", m_occludedRegions.size(), m_passElements.size(),
+ DISCARDED_ELEMENTS, g_pHyprOpenGL->m_renderData.pMonitor->m_pixelSize),
+ Colors::WHITE, 12);
if (tex) {
box = CBox{{0.F, g_pHyprOpenGL->m_renderData.pMonitor->m_size.y - tex->m_size.y}, tex->m_size}.scale(g_pHyprOpenGL->m_renderData.pMonitor->m_scale);
@@ -292,7 +292,7 @@ void CRenderPass::renderDebugData() {
if (!passStructure.empty())
passStructure.pop_back();
- tex = g_pHyprOpenGL->renderText(passStructure, Colors::WHITE, 12);
+ tex = g_pHyprRenderer->renderText(passStructure, Colors::WHITE, 12);
if (tex) {
box = CBox{{g_pHyprOpenGL->m_renderData.pMonitor->m_size.x - tex->m_size.x, g_pHyprOpenGL->m_renderData.pMonitor->m_size.y - tex->m_size.y}, tex->m_size}.scale(
g_pHyprOpenGL->m_renderData.pMonitor->m_scale);
diff --git a/src/render/pass/SurfacePassElement.cpp b/src/render/pass/SurfacePassElement.cpp
index 89cd9d73..ce62998e 100644
--- a/src/render/pass/SurfacePassElement.cpp
+++ b/src/render/pass/SurfacePassElement.cpp
@@ -84,7 +84,7 @@ bool CSurfacePassElement::needsLiveBlur() {
if (m_data.popup)
return BLUR;
- const bool NEWOPTIM = g_pHyprOpenGL->shouldUseNewBlurOptimizations(m_data.pLS, m_data.pWindow);
+ const bool NEWOPTIM = g_pHyprRenderer->shouldUseNewBlurOptimizations(m_data.pLS, m_data.pWindow);
return BLUR && !NEWOPTIM;
}
@@ -101,7 +101,7 @@ bool CSurfacePassElement::needsPrecomputeBlur() {
if (m_data.popup)
return false;
- const bool NEWOPTIM = g_pHyprOpenGL->shouldUseNewBlurOptimizations(m_data.pLS, m_data.pWindow);
+ const bool NEWOPTIM = g_pHyprRenderer->shouldUseNewBlurOptimizations(m_data.pLS, m_data.pWindow);
return BLUR && NEWOPTIM;
}
diff --git a/src/render/pass/TextureMatteElement.cpp b/src/render/pass/TextureMatteElement.cpp
index a99a9ef9..f1f0ae17 100644
--- a/src/render/pass/TextureMatteElement.cpp
+++ b/src/render/pass/TextureMatteElement.cpp
@@ -1,5 +1,4 @@
#include "TextureMatteElement.hpp"
-#include "../OpenGL.hpp"
CTextureMatteElement::CTextureMatteElement(const CTextureMatteElement::STextureMatteData& data_) : m_data(data_) {
;