mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 09:45:59 +01:00
fix new blur optimizations with non-full damage
This commit is contained in:
parent
e794de1f4d
commit
024752bbe3
3 changed files with 22 additions and 0 deletions
|
@ -153,6 +153,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_pHyprOpenGL->preRender(PMONITOR);
|
||||||
|
|
||||||
if (!wlr_output_damage_attach_render(PMONITOR->damage, &hasChanged, &damage)){
|
if (!wlr_output_damage_attach_render(PMONITOR->damage, &hasChanged, &damage)){
|
||||||
Debug::log(ERR, "Couldn't attach render to display %s ???", PMONITOR->szName.c_str());
|
Debug::log(ERR, "Couldn't attach render to display %s ???", PMONITOR->szName.c_str());
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -579,6 +579,25 @@ void CHyprOpenGLImpl::markBlurDirtyForMonitor(CMonitor* pMonitor) {
|
||||||
m_mMonitorRenderResources[pMonitor].blurFBDirty = true;
|
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() {
|
void CHyprOpenGLImpl::preBlurForCurrentMonitor() {
|
||||||
|
|
||||||
// make the fake dmg
|
// make the fake dmg
|
||||||
|
|
|
@ -88,6 +88,7 @@ public:
|
||||||
void markBlurDirtyForMonitor(CMonitor*);
|
void markBlurDirtyForMonitor(CMonitor*);
|
||||||
|
|
||||||
void preWindowPass();
|
void preWindowPass();
|
||||||
|
void preRender(CMonitor*);
|
||||||
|
|
||||||
SCurrentRenderData m_RenderData;
|
SCurrentRenderData m_RenderData;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue