mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 22:22:00 -07:00
output: minor tearing fixes
This commit is contained in:
@@ -812,7 +812,8 @@ bool CMonitor::attemptDirectScanout() {
|
|||||||
// and comes from the appropriate device. This may implode on multi-gpu!!
|
// and comes from the appropriate device. This may implode on multi-gpu!!
|
||||||
|
|
||||||
output->state->setBuffer(PSURFACE->current.buffer);
|
output->state->setBuffer(PSURFACE->current.buffer);
|
||||||
output->state->setPresentationMode(Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC);
|
output->state->setPresentationMode(tearingState.activelyTearing ? Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_IMMEDIATE :
|
||||||
|
Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC);
|
||||||
|
|
||||||
if (!state.test())
|
if (!state.test())
|
||||||
return false;
|
return false;
|
||||||
|
@@ -1193,6 +1193,8 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
|||||||
shouldTear = true;
|
shouldTear = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pMonitor->tearingState.activelyTearing = shouldTear;
|
||||||
|
|
||||||
if (!*PNODIRECTSCANOUT && !shouldTear) {
|
if (!*PNODIRECTSCANOUT && !shouldTear) {
|
||||||
if (pMonitor->attemptDirectScanout()) {
|
if (pMonitor->attemptDirectScanout()) {
|
||||||
return;
|
return;
|
||||||
@@ -1202,11 +1204,6 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pMonitor->tearingState.activelyTearing != shouldTear) {
|
|
||||||
// change of state
|
|
||||||
pMonitor->tearingState.activelyTearing = shouldTear;
|
|
||||||
}
|
|
||||||
|
|
||||||
EMIT_HOOK_EVENT("preRender", pMonitor);
|
EMIT_HOOK_EVENT("preRender", pMonitor);
|
||||||
|
|
||||||
timespec now;
|
timespec now;
|
||||||
|
Reference in New Issue
Block a user