mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-07 08:58:03 +02:00
mark blur dirty when CM/DS changes
This commit is contained in:
parent
bcbe5dbfad
commit
60abf28fc9
3 changed files with 18 additions and 12 deletions
|
|
@ -620,6 +620,7 @@ void CMonitor::applyCMType(NCMType::eCMType cmType, NTransferFunction::eTF cmSdr
|
|||
if (oldImageDescription != m_imageDescription) {
|
||||
if (PROTO::colorManagement)
|
||||
PROTO::colorManagement->onMonitorImageDescriptionChanged(m_self);
|
||||
m_blurFBDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2063,6 +2064,20 @@ bool CMonitor::attemptDirectScanout() {
|
|||
return true;
|
||||
}
|
||||
|
||||
void CMonitor::handleDSleave() {
|
||||
Log::logger->log(Log::DEBUG, "Left a direct scanout.");
|
||||
m_lastScanout.reset();
|
||||
m_previousFSWindow.reset(); // recalc fs settings
|
||||
m_directScanoutIsActive = false;
|
||||
|
||||
// reset DRM format, but only if needed since it might modeset
|
||||
if (m_output->state->state().drmFormat != m_prevDrmFormat)
|
||||
m_output->state->setFormat(m_prevDrmFormat);
|
||||
|
||||
m_drmFormat = m_prevDrmFormat;
|
||||
m_blurFBDirty = true;
|
||||
}
|
||||
|
||||
bool CMonitor::canAttemptDirectScanoutFast() const {
|
||||
return !m_solitaryClient.expired() || !m_lastScanout.expired() || m_directScanoutIsActive;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ class CMonitor {
|
|||
bool updateTearing();
|
||||
uint16_t isDSBlocked(bool full = false);
|
||||
bool attemptDirectScanout();
|
||||
void handleDSleave();
|
||||
bool canAttemptDirectScanoutFast() const;
|
||||
bool isMultiGPU();
|
||||
void setCTM(const Mat3x3& ctm);
|
||||
|
|
|
|||
|
|
@ -1974,18 +1974,8 @@ void IHyprRenderer::renderMonitor(PHLMONITOR pMonitor, bool commit) {
|
|||
}
|
||||
handleFullscreenSettings(pMonitor);
|
||||
return;
|
||||
} else if (!pMonitor->m_lastScanout.expired() || pMonitor->m_directScanoutIsActive) {
|
||||
Log::logger->log(Log::DEBUG, "Left a direct scanout.");
|
||||
pMonitor->m_lastScanout.reset();
|
||||
pMonitor->m_previousFSWindow.reset(); // recalc fs settings
|
||||
pMonitor->m_directScanoutIsActive = false;
|
||||
|
||||
// reset DRM format, but only if needed since it might modeset
|
||||
if (pMonitor->m_output->state->state().drmFormat != pMonitor->m_prevDrmFormat)
|
||||
pMonitor->m_output->state->setFormat(pMonitor->m_prevDrmFormat);
|
||||
|
||||
pMonitor->m_drmFormat = pMonitor->m_prevDrmFormat;
|
||||
}
|
||||
} else if (!pMonitor->m_lastScanout.expired() || pMonitor->m_directScanoutIsActive)
|
||||
pMonitor->handleDSleave();
|
||||
}
|
||||
|
||||
Event::bus()->m_events.render.pre.emit(pMonitor);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue