swrenderer: Optimize image drawing by using premultiplied colors

This commit is contained in:
Olivier Goffart 2022-06-14 10:54:10 +02:00 committed by Olivier Goffart
parent ca74f91320
commit 014c827194
6 changed files with 102 additions and 37 deletions

View file

@ -16,6 +16,8 @@ pub enum PixelFormat {
Rgb,
// 32 bit RGBA
Rgba,
// 32 bit RGBA, but the RGB values are pre-multiplied by the alpha
RgbaPremultiplied,
// 8bit alpha map with a given color
AlphaMap([u8; 3]),
}