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:
Ben Buhse 2026-02-22 18:15:04 -06:00
commit 006bae3532
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
2 changed files with 56 additions and 24 deletions

View file

@ -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();