mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-15 05:33:58 -04:00
refactor: break out stride calculation to new function
This commit is contained in:
parent
8aa53d1508
commit
33b5210a6a
3 changed files with 13 additions and 6 deletions
9
stride.h
Normal file
9
stride.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <pixman.h>
|
||||
|
||||
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue