summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-01 20:18:26 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-01 20:18:26 +0200
commit024752bbe30aed16fddfb3a2c86d63c3eab7e4dc (patch)
tree72efcdf2640b12002ee5f9e1123d97baea0c08a1 /src/render/OpenGL.cpp
parente794de1f4d6b9193adeda378da812956031085be (diff)
fix new blur optimizations with non-full damage
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 4095099b..a6db359a 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -579,6 +579,25 @@ void CHyprOpenGLImpl::markBlurDirtyForMonitor(CMonitor* pMonitor) {
m_mMonitorRenderResources[pMonitor].blurFBDirty = true;
}
+void CHyprOpenGLImpl::preRender(CMonitor* pMonitor) {
+ static auto *const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
+
+ if (!*PBLURNEWOPTIMIZE || !m_mMonitorRenderResources[pMonitor].blurFBDirty)
+ return;
+
+ bool has = false;
+
+ for (auto& w : g_pCompositor->m_vWindows) {
+ if (w->m_iWorkspaceID == pMonitor->activeWorkspace && w->m_bIsMapped && !w->m_bHidden && !w->m_bIsFloating) {
+ has = true;
+ break;
+ }
+ }
+
+ if (has)
+ g_pHyprRenderer->damageMonitor(pMonitor);
+}
+
void CHyprOpenGLImpl::preBlurForCurrentMonitor() {
// make the fake dmg