summaryrefslogtreecommitdiff
path: root/src/fb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fb.h')
-rw-r--r--src/fb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fb.h b/src/fb.h
index b990ae6..e8d818f 100644
--- a/src/fb.h
+++ b/src/fb.h
@@ -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
© All Rights Reserved