diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 18:03:47 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 18:03:47 +0200 |
| commit | ff598b0827ca179c57ff2e97806cd65b69374699 (patch) | |
| tree | ff5a760988331b9d93be6668f48ec747b8af53f9 /src/render/OpenGL.cpp | |
| parent | e5dd133808acd1ca1c7060f04d4224e1d9aac79d (diff) | |
renderer: don't occlude when pre-blur is queued
Diffstat (limited to 'src/render/OpenGL.cpp')
| -rw-r--r-- | src/render/OpenGL.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 6b72e820..fe028f08 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -945,16 +945,20 @@ void CHyprOpenGLImpl::preBlurForCurrentMonitor() { } void CHyprOpenGLImpl::preWindowPass() { - static auto* const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue; - static auto* const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue; - - if (!m_RenderData.pCurrentMonData->blurFBDirty || !*PBLURNEWOPTIMIZE || !*PBLUR || !m_RenderData.pCurrentMonData->blurFBShouldRender) + if (!preBlurQueued()) return; // blur the main FB, it will be rendered onto the mirror preBlurForCurrentMonitor(); } +bool CHyprOpenGLImpl::preBlurQueued() { + static auto* const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue; + static auto* const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue; + + return !(!m_RenderData.pCurrentMonData->blurFBDirty || !*PBLURNEWOPTIMIZE || !*PBLUR || !m_RenderData.pCurrentMonData->blurFBShouldRender); +} + void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox, float a, wlr_surface* pSurface, int round, bool blockBlurOptimization) { RASSERT(m_RenderData.pMonitor, "Tried to render texture with blur without begin()!"); |
