From b947448795d604f169246b0c3191028ae6a0ab83 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 1 Aug 2020 15:32:48 +0200 Subject: Initial commit Can display a single PNG image scaled-to-fit on all outputs. --- stride.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 stride.h (limited to 'stride.h') diff --git a/stride.h b/stride.h new file mode 100644 index 0000000..b2c71a7 --- /dev/null +++ b/stride.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +static inline int +stride_for_format_and_width(pixman_format_code_t format, int width) +{ + return (((PIXMAN_FORMAT_BPP(format) * width + 7) / 8 + 4 - 1) & -4); +} -- cgit v1.2.3