mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 02:45:59 +01:00
damage: use buffer_damage instead of effective_damage
This commit is contained in:
parent
307dd8f511
commit
c4365f20ed
2 changed files with 2 additions and 5 deletions
|
@ -264,11 +264,9 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
|
||||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID);
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID);
|
||||||
if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear &&
|
if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear &&
|
||||||
pNode->pSurface->wlr()->current.committed & WLR_SURFACE_STATE_BUFFER) {
|
pNode->pSurface->wlr()->current.committed & WLR_SURFACE_STATE_BUFFER) {
|
||||||
CRegion damageBox;
|
CRegion damageBox{&pNode->pSurface->wlr()->buffer_damage};
|
||||||
wlr_surface_get_effective_damage(pNode->pSurface->wlr(), damageBox.pixman());
|
|
||||||
|
|
||||||
if (!damageBox.empty()) {
|
if (!damageBox.empty()) {
|
||||||
|
|
||||||
if (PMONITOR->tearingState.busy) {
|
if (PMONITOR->tearingState.busy) {
|
||||||
PMONITOR->tearingState.frameScheduledWhileBusy = true;
|
PMONITOR->tearingState.frameScheduledWhileBusy = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1575,8 +1575,7 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y, dou
|
||||||
y += CORRECTION.y;
|
y += CORRECTION.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
CRegion damageBox;
|
CRegion damageBox{&pSurface->buffer_damage};
|
||||||
wlr_surface_get_effective_damage(pSurface, damageBox.pixman());
|
|
||||||
if (scale != 1.0)
|
if (scale != 1.0)
|
||||||
wlr_region_scale(damageBox.pixman(), damageBox.pixman(), scale);
|
wlr_region_scale(damageBox.pixman(), damageBox.pixman(), scale);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue