mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 01:46:00 +01:00
renderer: considerable fixes to repaint logic
This commit is contained in:
parent
f8c18ff797
commit
4531717f3e
2 changed files with 4 additions and 2 deletions
|
@ -156,7 +156,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
||||||
if (!PMONITOR->tearingState.frameScheduledWhileBusy)
|
if (!PMONITOR->tearingState.frameScheduledWhileBusy)
|
||||||
return; // we did not schedule a frame yet to be displayed, but we are tearing. Why render?
|
return; // we did not schedule a frame yet to be displayed, but we are tearing. Why render?
|
||||||
|
|
||||||
PMONITOR->tearingState.nextRenderTorn = true;
|
PMONITOR->tearingState.nextRenderTorn = true;
|
||||||
|
PMONITOR->tearingState.frameScheduledWhileBusy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static auto* const PENABLERAT = &g_pConfigManager->getConfigValuePtr("misc:render_ahead_of_time")->intValue;
|
static auto* const PENABLERAT = &g_pConfigManager->getConfigValuePtr("misc:render_ahead_of_time")->intValue;
|
||||||
|
|
|
@ -249,7 +249,8 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
|
||||||
if (pNode->pWindowOwner) {
|
if (pNode->pWindowOwner) {
|
||||||
// tearing: if solitary, redraw it. This still might be a single surface window
|
// tearing: if solitary, redraw it. This still might be a single surface window
|
||||||
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) {
|
||||||
|
|
||||||
CRegion damageBox;
|
CRegion damageBox;
|
||||||
wlr_surface_get_effective_damage(pNode->pSurface->wlr(), damageBox.pixman());
|
wlr_surface_get_effective_damage(pNode->pSurface->wlr(), damageBox.pixman());
|
||||||
|
|
Loading…
Reference in a new issue