From c4365f20ed8ff0dd480b7ed7cf1bfff1a0b6911a Mon Sep 17 00:00:00 2001 From: vaxerski Date: Wed, 17 Jan 2024 16:01:20 +0100 Subject: [PATCH] damage: use buffer_damage instead of effective_damage --- src/helpers/SubsurfaceTree.cpp | 4 +--- src/render/Renderer.cpp | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/helpers/SubsurfaceTree.cpp b/src/helpers/SubsurfaceTree.cpp index 41b968e4..f9b1cb72 100644 --- a/src/helpers/SubsurfaceTree.cpp +++ b/src/helpers/SubsurfaceTree.cpp @@ -264,11 +264,9 @@ void Events::listener_commitSubsurface(void* owner, void* data) { const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID); if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear && pNode->pSurface->wlr()->current.committed & WLR_SURFACE_STATE_BUFFER) { - CRegion damageBox; - wlr_surface_get_effective_damage(pNode->pSurface->wlr(), damageBox.pixman()); + CRegion damageBox{&pNode->pSurface->wlr()->buffer_damage}; if (!damageBox.empty()) { - if (PMONITOR->tearingState.busy) { PMONITOR->tearingState.frameScheduledWhileBusy = true; } else { diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index cf246c7c..d44aafd5 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1575,8 +1575,7 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y, dou y += CORRECTION.y; } - CRegion damageBox; - wlr_surface_get_effective_damage(pSurface, damageBox.pixman()); + CRegion damageBox{&pSurface->buffer_damage}; if (scale != 1.0) wlr_region_scale(damageBox.pixman(), damageBox.pixman(), scale);