it: use single-pixel buffer instead of shm
This commit is contained in:
parent
aaed003ec8
commit
f562f887f0
17 changed files with 280 additions and 76 deletions
|
|
@ -33,6 +33,7 @@ fn to_f32(c: u8) -> f32 {
|
|||
c as f32 / 255f32
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn to_u8(c: f32) -> u8 {
|
||||
(c * 255f32) as u8
|
||||
}
|
||||
|
|
@ -87,7 +88,7 @@ impl Color {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
||||
#[allow(dead_code)]
|
||||
pub fn to_rgba_premultiplied(self) -> [u8; 4] {
|
||||
[to_u8(self.r), to_u8(self.g), to_u8(self.b), to_u8(self.a)]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue