mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 06:31:57 -07:00
renderer: proper full occlusion checks for back layer
This commit is contained in:
@@ -2187,7 +2187,12 @@ bool CHyprRenderer::canSkipBackBufferClear(CMonitor* pMonitor) {
|
||||
ls->geometry.height != pMonitor->vecSize.y)
|
||||
continue;
|
||||
|
||||
if (!ls->layerSurface->surface->opaque)
|
||||
// TODO: cache maybe?
|
||||
CRegion opaque = &ls->layerSurface->surface->opaque_region;
|
||||
CBox lsbox = {0, 0, ls->layerSurface->surface->current.buffer_width, ls->layerSurface->surface->current.buffer_height};
|
||||
opaque.invert(lsbox);
|
||||
|
||||
if (!opaque.empty())
|
||||
continue;
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user