mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-15 12:03:48 -07:00
renderer: allow commits when buffer is unchanged but cursor changed (#9648)
This commit is contained in:
@@ -1355,9 +1355,8 @@ bool CMonitor::attemptDirectScanout() {
|
|||||||
|
|
||||||
Debug::log(TRACE, "attemptDirectScanout: surface {:x} passed, will attempt, buffer {}", (uintptr_t)PSURFACE.get(), (uintptr_t)PSURFACE->current.buffer->buffer.get());
|
Debug::log(TRACE, "attemptDirectScanout: surface {:x} passed, will attempt, buffer {}", (uintptr_t)PSURFACE.get(), (uintptr_t)PSURFACE->current.buffer->buffer.get());
|
||||||
|
|
||||||
auto PBUFFER = PSURFACE->current.buffer->buffer.lock();
|
auto PBUFFER = PSURFACE->current.buffer->buffer.lock();
|
||||||
if (PBUFFER == output->state->state().buffer)
|
bool SAMEBUFFER = PBUFFER == output->state->state().buffer;
|
||||||
return true;
|
|
||||||
|
|
||||||
// FIXME: make sure the buffer actually follows the available scanout dmabuf formats
|
// FIXME: make sure the buffer actually follows the available scanout dmabuf formats
|
||||||
// and comes from the appropriate device. This may implode on multi-gpu!!
|
// and comes from the appropriate device. This may implode on multi-gpu!!
|
||||||
@@ -1371,7 +1370,8 @@ bool CMonitor::attemptDirectScanout() {
|
|||||||
drmFormat = params.format;
|
drmFormat = params.format;
|
||||||
}
|
}
|
||||||
|
|
||||||
output->state->setBuffer(PBUFFER);
|
if (!SAMEBUFFER)
|
||||||
|
output->state->setBuffer(PBUFFER);
|
||||||
output->state->setPresentationMode(tearingState.activelyTearing ? Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_IMMEDIATE :
|
output->state->setPresentationMode(tearingState.activelyTearing ? Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_IMMEDIATE :
|
||||||
Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC);
|
Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC);
|
||||||
|
|
||||||
@@ -1426,7 +1426,7 @@ bool CMonitor::attemptDirectScanout() {
|
|||||||
Debug::log(LOG, "Entered a direct scanout to {:x}: \"{}\"", (uintptr_t)PCANDIDATE.get(), PCANDIDATE->m_szTitle);
|
Debug::log(LOG, "Entered a direct scanout to {:x}: \"{}\"", (uintptr_t)PCANDIDATE.get(), PCANDIDATE->m_szTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PBUFFER->lockedByBackend || PBUFFER->hlEvents.backendRelease)
|
if (!PBUFFER->lockedByBackend || PBUFFER->hlEvents.backendRelease || SAMEBUFFER)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// lock buffer while DRM/KMS is using it, then release it when page flip happens since DRM/KMS should be done by then
|
// lock buffer while DRM/KMS is using it, then release it when page flip happens since DRM/KMS should be done by then
|
||||||
|
Reference in New Issue
Block a user