From a163ca92377a56c196222a48c0a5676a7bb4ac3b Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 18 Dec 2022 12:41:13 +0000 Subject: fix blur damage spam on no blurred windows --- src/render/OpenGL.hpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'src/render/OpenGL.hpp') diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index d550ca0a..c716590a 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -32,20 +32,21 @@ struct SMonitorRenderData { CTexture stencilTex; CFramebuffer blurFB; - bool blurFBDirty = true; + bool blurFBDirty = true; + bool blurFBShouldRender = false; wlr_box backgroundTexBox; // Shaders - bool m_bShadersInitialized = false; - CShader m_shQUAD; - CShader m_shRGBA; - CShader m_shRGBX; - CShader m_shEXT; - CShader m_shBLUR1; - CShader m_shBLUR2; - CShader m_shSHADOW; - CShader m_shBORDER1; + bool m_bShadersInitialized = false; + CShader m_shQUAD; + CShader m_shRGBA; + CShader m_shRGBX; + CShader m_shEXT; + CShader m_shBLUR1; + CShader m_shBLUR2; + CShader m_shSHADOW; + CShader m_shBORDER1; // }; @@ -142,13 +143,13 @@ class CHyprOpenGLImpl { void initShaders(); // returns the out FB, can be either Mirror or MirrorSwap - CFramebuffer* blurMainFramebufferWithDamage(float a, wlr_box* pBox, pixman_region32_t* damage); + CFramebuffer* blurMainFramebufferWithDamage(float a, wlr_box* pBox, pixman_region32_t* damage); - void renderTextureInternalWithDamage(const CTexture&, wlr_box* pBox, float a, pixman_region32_t* damage, int round = 0, bool discardOpaque = false, bool noAA = false, - bool allowCustomUV = false, bool allowDim = false); - void renderSplash(cairo_t* const, cairo_surface_t* const, double); + void renderTextureInternalWithDamage(const CTexture&, wlr_box* pBox, float a, pixman_region32_t* damage, int round = 0, bool discardOpaque = false, bool noAA = false, + bool allowCustomUV = false, bool allowDim = false); + void renderSplash(cairo_t* const, cairo_surface_t* const, double); - void preBlurForCurrentMonitor(); + void preBlurForCurrentMonitor(); friend class CHyprRenderer; }; -- cgit v1.2.3