backends/drm: ensure icc profiles aren't applied with HDR

ICC profiles don't support HDR yet, and they don't make a lot of sense with
how unpredictable displays behave with BT2020 and/or PQ inputs
master
Xaver Hugl 11 months ago
parent cdadf7cf7f
commit bdc62b3516

@ -349,7 +349,12 @@ void DrmOutput::applyQueuedChanges(const std::shared_ptr<OutputChangeSet> &props
if (props->iccProfilePath) { if (props->iccProfilePath) {
next.iccProfilePath = *props->iccProfilePath; next.iccProfilePath = *props->iccProfilePath;
next.iccProfile = IccProfile::load(*props->iccProfilePath); next.iccProfile = IccProfile::load(*props->iccProfilePath);
}
if (!next.highDynamicRange && !next.wideColorGamut) {
m_pipeline->setIccProfile(next.iccProfile); m_pipeline->setIccProfile(next.iccProfile);
} else {
// ICC profiles don't support HDR (yet)
m_pipeline->setIccProfile(nullptr);
} }
if (m_state.highDynamicRange != next.highDynamicRange || m_state.sdrBrightness != next.sdrBrightness || m_state.wideColorGamut != next.wideColorGamut || m_state.iccProfile != next.iccProfile) { if (m_state.highDynamicRange != next.highDynamicRange || m_state.sdrBrightness != next.sdrBrightness || m_state.wideColorGamut != next.wideColorGamut || m_state.iccProfile != next.iccProfile) {
m_renderLoop->scheduleRepaint(); m_renderLoop->scheduleRepaint();

Loading…
Cancel
Save