summaryrefslogtreecommitdiff
path: root/src/screen/drm/frame-buffer/pixelformat.zig
blob: ec9890028dc328ca117abe1250dc9b0d95a4f355 (plain)
1
2
3
4
5
6
7
8
9
10
11
fn pixel_format_code(comptime a: u8, comptime b: u8, comptime c: u8, comptime d: u8) u32 {
	return @as(u32, @intCast(a)) |
		(@as(u32, @intCast(b)) << 8) |
		(@as(u32, @intCast(c)) << 16) |
		(@as(u32, @intCast(d)) << 24);
}

pub const PixelFormat = enum(u32) {
	xrgb8888 = pixel_format_code('X', 'R', '2', '4'),
};