summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 38e5047)
raw | patch | inline | side by side (from parent 1: 38e5047)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Tue, 8 Mar 2016 09:22:11 +0000 (11:22 +0200) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Tue, 8 Mar 2016 13:42:47 +0000 (15:42 +0200) |
tests/fbtestpat.cpp | patch | blob | history |
diff --git a/tests/fbtestpat.cpp b/tests/fbtestpat.cpp
index 96077578b8486114f2995dd602cf0ce7f52a5c50..529a688c725c9b3fa45f93c526061573fdacb976 100644 (file)
--- a/tests/fbtestpat.cpp
+++ b/tests/fbtestpat.cpp
r = ioctl(fd, FBIOGET_FSCREENINFO, &fix);
FAIL_IF(r, "FBIOGET_FSCREENINFO failed");
- void* ptr = mmap(NULL,
+ uint8_t* ptr = (uint8_t*)mmap(NULL,
var.yres_virtual * fix.line_length,
PROT_WRITE | PROT_READ,
MAP_SHARED, fd, 0);
draw_test_pattern(buf);
- memcpy(ptr, buf.map(0), buf.size(0));
+ for (unsigned y = 0; y < var.yres_virtual; ++y)
+ memcpy(ptr + fix.line_length * y, buf.map(0) + buf.stride(0) * y, buf.stride(0));
close(fd);