diff options
Diffstat (limited to 'kms++util/src')
-rw-r--r-- | kms++util/src/drawing.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kms++util/src/drawing.cpp b/kms++util/src/drawing.cpp index 3752f94..24a9954 100644 --- a/kms++util/src/drawing.cpp +++ b/kms++util/src/drawing.cpp @@ -1,5 +1,6 @@ #include <cmath> +#include <unistd.h> #include <kms++/kms++.h> #include <kms++util/kms++util.h> @@ -569,4 +570,10 @@ void draw_text(IFramebuffer& buf, uint32_t x, uint32_t y, const string& str, RGB draw_char(buf, (x + 8 * i), y, str[i], color); } +void dump_framebuffer(IFramebuffer &fb, int fd) +{ + for (unsigned int i = 0; i < fb.num_planes(); ++i) + ::write(fd, fb.map(i), fb.size(i)); +} + } |