diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fb.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2,6 +2,7 @@ #define _FB_H #include <stdint.h> +#include <string.h> #include <sys/types.h> #include <xf86drmMode.h> /* for drmModeModeInfoPtr */ @@ -67,4 +68,11 @@ static inline int fb_fragment_put_pixel_checked(fb_fragment_t *fragment, int x, return 1; } + +/* zero a fragment */ +static inline void fb_fragment_zero(fb_fragment_t *fragment) +{ + memset(fragment->buf, 0, ((fragment->width << 2) + fragment->stride) * fragment->height); +} + #endif |