1
0
Fork 0
forked from wry/wry

cmm: don't use display primaries as target_primaries in SDR mode

This commit is contained in:
Julian Orth 2025-12-04 14:07:14 +01:00
parent 1189827b8b
commit 2b7b3b5310

View file

@ -379,16 +379,27 @@ impl WlOutputGlobal {
max_cll = Some(F64(l.max)); max_cll = Some(F64(l.max));
max_fall = Some(F64(l.max_fall)); max_fall = Some(F64(l.max_fall));
} }
let primaries = match self.bcs.get() { let named_primaries;
BackendColorSpace::Default => NamedPrimaries::Srgb, let primaries;
BackendColorSpace::Bt2020 => NamedPrimaries::Bt2020, let target_primaries;
}; match self.bcs.get() {
BackendColorSpace::Default => {
named_primaries = NamedPrimaries::Srgb;
primaries = named_primaries.primaries();
target_primaries = primaries;
}
BackendColorSpace::Bt2020 => {
named_primaries = NamedPrimaries::Bt2020;
primaries = named_primaries.primaries();
target_primaries = self.primaries;
}
}
let cd = self.state.color_manager.get_description( let cd = self.state.color_manager.get_description(
Some(primaries), Some(named_primaries),
primaries.primaries(), primaries,
luminance, luminance,
tf, tf,
self.primaries, target_primaries,
target_luminance, target_luminance,
max_cll, max_cll,
max_fall, max_fall,