summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1c7a7a1)
raw | patch | inline | side by side (parent: 1c7a7a1)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Wed, 9 Mar 2016 08:55:50 +0000 (10:55 +0200) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Fri, 11 Mar 2016 10:45:10 +0000 (12:45 +0200) |
tests/kmsview.cpp | patch | blob | history |
diff --git a/tests/kmsview.cpp b/tests/kmsview.cpp
index 7bd67a420c573a29b434e6cd436ea82efcaeb6d0..07dc09aea33a54d7e36a859fd0062ae70618393c 100644 (file)
--- a/tests/kmsview.cpp
+++ b/tests/kmsview.cpp
static void read_frame(ifstream& is, DumbFramebuffer* fb, Crtc* crtc, Plane* plane)
{
- is.read((char*)fb->map(0), fb->size(0));
+ for (unsigned i = 0; i < fb->num_planes(); ++i)
+ is.read((char*)fb->map(i), fb->size(i));
int r = crtc->set_plane(plane, *fb,
0, 0, fb->width(), fb->height(),
FAIL_IF(!plane, "available plane not found");
- unsigned num_frames = fsize / fb->size(0);
+ unsigned frame_size = 0;
+ for (unsigned i = 0; i < fb->num_planes(); ++i)
+ frame_size += fb->size(i);
+
+ unsigned num_frames = fsize / frame_size;
printf("file size %u, frames %u\n", fsize, num_frames);
for (unsigned i = 0; i < num_frames; ++i) {