jay-compositor 1.15.0

The Jay compositor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::gfx_api::AlphaMode;

pub const AM_PREMULTIPLIED_ELECTRICAL: u32 = 0;
pub const AM_PREMULTIPLIED_OPTICAL: u32 = 1;
pub const AM_STRAIGHT: u32 = 2;

impl AlphaMode {
    pub fn to_vulkan(self) -> u32 {
        match self {
            AlphaMode::PremultipliedElectrical => AM_PREMULTIPLIED_ELECTRICAL,
            AlphaMode::PremultipliedOptical => AM_PREMULTIPLIED_OPTICAL,
            AlphaMode::Straight => AM_STRAIGHT,
        }
    }
}