From 966f20d305345b3042dc1d37a1dd8833f3a4783b Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Sat, 7 Mar 2026 16:13:34 +0300 Subject: renderer: refactor resources and flags (#13471) --- src/desktop/view/LayerSurface.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/desktop/view/LayerSurface.cpp') diff --git a/src/desktop/view/LayerSurface.cpp b/src/desktop/view/LayerSurface.cpp index a10c9d4d..1b2a3288 100644 --- a/src/desktop/view/LayerSurface.cpp +++ b/src/desktop/view/LayerSurface.cpp @@ -77,13 +77,8 @@ CLayerSurface::CLayerSurface(SP resource_) : IView(CWLSurfa } CLayerSurface::~CLayerSurface() { - if (!g_pHyprOpenGL) - return; - if (m_wlSurface) m_wlSurface->unassign(); - g_pHyprRenderer->makeEGLCurrent(); - std::erase_if(g_pHyprOpenGL->m_layerFramebuffers, [&](const auto& other) { return other.first.expired() || other.first.lock() == m_self.lock(); }); for (auto const& mon : g_pCompositor->m_realMonitors) { for (auto& lsl : mon->m_layerSurfaceLayers) { @@ -315,7 +310,7 @@ void CLayerSurface::onCommit() { return; if (m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND || m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM) - g_pHyprOpenGL->markBlurDirtyForMonitor(PMONITOR); // so that blur is recalc'd + PMONITOR->m_blurFBDirty = true; CBox geomFixed = {m_geometry.x, m_geometry.y, m_geometry.width, m_geometry.height}; g_pHyprRenderer->damageBox(geomFixed); @@ -340,7 +335,7 @@ void CLayerSurface::onCommit() { *m_alpha = PMONITOR->inFullscreenMode() ? (m_layer >= ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY ? 1.F : 0.F) : 1.F; if (m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND || m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM) - g_pHyprOpenGL->markBlurDirtyForMonitor(PMONITOR); // so that blur is recalc'd + PMONITOR->m_blurFBDirty = true; // so that blur is recalc'd } g_pHyprRenderer->arrangeLayersForMonitor(PMONITOR->m_id); -- cgit v1.2.3