renderer: optimize render pipeline when there is a solitary client
This commit is contained in:
parent
ab11bd2085
commit
a44ab7748f
6 changed files with 100 additions and 80 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue