1
0
Fork 0
forked from wry/wry

cmm: store render intent

This commit is contained in:
Julian Orth 2026-03-29 15:34:53 +02:00
parent a4928d8ed6
commit dca0df2555
16 changed files with 207 additions and 60 deletions

View file

@ -0,0 +1,29 @@
use crate::{ifs::color_management::RENDER_INTENT_PERCEPTUAL, object::Version};
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Default)]
pub enum RenderIntent {
#[default]
Perceptual,
}
impl RenderIntent {
pub fn from_wayland(intent: u32, _version: Version) -> Option<Self> {
let res = match intent {
RENDER_INTENT_PERCEPTUAL => Self::Perceptual,
_ => return None,
};
Some(res)
}
pub fn black_point_compensation(self) -> bool {
match self {
RenderIntent::Perceptual => true,
}
}
pub fn bradford_adjustment(self) -> bool {
match self {
RenderIntent::Perceptual => true,
}
}
}