From c353b7c4f75e53af006bc2cf686b02c9a6495b60 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 22 Feb 2024 23:01:22 +0000 Subject: [PATCH] renderer: minor fixes for introspection detection --- src/render/OpenGL.cpp | 4 ++-- src/render/Renderer.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index ffcd13d4..c11fd8c0 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -164,7 +164,7 @@ bool CHyprOpenGLImpl::passRequiresIntrospection(CMonitor* pMonitor) { } } - if (*PXRAY) + if (**PXRAY) return false; for (auto& w : g_pCompositor->m_vWindows) { @@ -249,7 +249,7 @@ void CHyprOpenGLImpl::begin(CMonitor* pMonitor, CRegion* pDamage, CFramebuffer* } const auto PRBO = g_pHyprRenderer->getCurrentRBO(); - const bool FBPROPERSIZE = fb && fb->m_vSize == pMonitor->vecPixelSize; + const bool FBPROPERSIZE = !fb || fb->m_vSize == pMonitor->vecPixelSize; if (m_RenderData.forceIntrospection || !FBPROPERSIZE || m_sFinalScreenShader.program > 0 || (PRBO && pMonitor->vecPixelSize != PRBO->getFB()->m_vSize) || passRequiresIntrospection(pMonitor)) { diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 235c3f6f..2aa84a56 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1141,7 +1141,8 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { static auto* const PBLURENABLED = (Hyprlang::INT* const*)g_pConfigManager->getConfigValuePtr("decoration:blur:enabled"); // if we use blur we need to expand the damage for proper blurring - if (**PBLURENABLED == 1) { + // if framebuffer was not offloaded we're not doing introspection aka not blurring so this is redundant and dumb + if (**PBLURENABLED == 1 && g_pHyprOpenGL->m_bOffloadedFramebuffer) { // TODO: can this be optimized? static auto* const PBLURSIZE = (Hyprlang::INT* const*)g_pConfigManager->getConfigValuePtr("decoration:blur:size"); static auto* const PBLURPASSES = (Hyprlang::INT* const*)g_pConfigManager->getConfigValuePtr("decoration:blur:passes");