Remove manual pixel conversion in WallpaperImage
I used to manually convert pixels from RGBA=>ARGB because Wayland compositors are only guaranteed to support XRGB and ARGB, but zigimg doesn't include either of those. This was a bit slow, especially on debug builds (though not *super* noticeable on release builds). I realized, though, that zigimg's Rgba32 format is the same as pixman's a8b8g8r8... on little-endian. I kept the old code just in case someone out there happens to be running beansprout on MIPS, but I have not tested it.
This commit is contained in:
parent
4c58a3d842
commit
006bae3532
2 changed files with 56 additions and 24 deletions
|
|
@ -457,7 +457,7 @@ pub fn renderWallpaper(output: *Output) !void {
|
|||
}
|
||||
// Scale our loaded image and then copy it into the Buffer's pixman.Image
|
||||
const wallpaper_image = context.wallpaper_image orelse return error.MissingWallpaperImage;
|
||||
const image = wallpaper_image.image;
|
||||
const image = wallpaper_image.pix_image;
|
||||
const image_data = image.getData();
|
||||
const image_width = image.getWidth();
|
||||
const image_height = image.getHeight();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue