mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-02 21:21:55 -07:00
renderer: optimize render pipeline when there is a solitary client
This commit is contained in:
@@ -250,8 +250,14 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
|
||||
// tearing: if solitary, redraw it. This still might be a single surface window
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID);
|
||||
if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->canTear) {
|
||||
PMONITOR->nextRenderTorn = true;
|
||||
g_pHyprRenderer->renderMonitor(PMONITOR);
|
||||
|
||||
CRegion damageBox;
|
||||
wlr_surface_get_effective_damage(pNode->pSurface->wlr(), damageBox.pixman());
|
||||
|
||||
if (!damageBox.empty()) {
|
||||
PMONITOR->nextRenderTorn = true;
|
||||
g_pHyprRenderer->renderMonitor(PMONITOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user