Skip to content

Commit

Permalink
damage: use buffer_damage instead of effective_damage
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jan 17, 2024
1 parent 307dd8f commit c4365f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/helpers/SubsurfaceTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions src/render/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c4365f2

Please sign in to comment.