summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 3e49992)
raw | patch | inline | side by side (from parent 1: 3e49992)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 26 Oct 2015 15:35:55 +0000 (17:35 +0200) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 26 Oct 2015 15:38:30 +0000 (17:38 +0200) |
libkms++/dumbframebuffer.cpp | patch | blob | history | |
libkms++/dumbframebuffer.h | patch | blob | history |
index 9de02da0074b61f8892040b9aa9f5dbc2fd7a2ef..c64010aa3df88fc278edae147b4acb37f7cb5a4c 100644 (file)
plane.handle = creq.handle;
plane.stride = creq.pitch;
plane.size = creq.height * creq.pitch;
plane.handle = creq.handle;
plane.stride = creq.pitch;
plane.size = creq.height * creq.pitch;
+ plane.offset = 0;
/*
printf("buf %d: %dx%d, bitspp %d, stride %d, size %d\n",
/*
printf("buf %d: %dx%d, bitspp %d, stride %d, size %d\n",
/* create framebuffer object for the dumb-buffer */
uint32_t bo_handles[4] = { m_planes[0].handle, m_planes[1].handle };
uint32_t pitches[4] = { m_planes[0].stride, m_planes[1].stride };
/* create framebuffer object for the dumb-buffer */
uint32_t bo_handles[4] = { m_planes[0].handle, m_planes[1].handle };
uint32_t pitches[4] = { m_planes[0].stride, m_planes[1].stride };
- uint32_t offsets[4] = { 0 };
+ uint32_t offsets[4] = { m_planes[0].offset, m_planes[1].offset };
uint32_t id;
r = drmModeAddFB2(card().fd(), width(), height(), (uint32_t)format(),
bo_handles, pitches, offsets, &id, 0);
uint32_t id;
r = drmModeAddFB2(card().fd(), width(), height(), (uint32_t)format(),
bo_handles, pitches, offsets, &id, 0);
index c836e398d0385cf23c15f1fc9169afb5a7208f24..49cf8a0daa352fff72f216a9440580c65fe97388 100644 (file)
uint8_t* map(unsigned plane) const { return m_planes[plane].map; }
uint32_t stride(unsigned plane) const { return m_planes[plane].stride; }
uint32_t size(unsigned plane) const { return m_planes[plane].size; }
uint8_t* map(unsigned plane) const { return m_planes[plane].map; }
uint32_t stride(unsigned plane) const { return m_planes[plane].stride; }
uint32_t size(unsigned plane) const { return m_planes[plane].size; }
+ uint32_t offset(unsigned plane) const { return m_planes[plane].offset; }
void clear();
void clear();
uint32_t handle;
uint32_t size;
uint32_t stride;
uint32_t handle;
uint32_t size;
uint32_t stride;
+ uint32_t offset;
uint8_t *map;
};
uint8_t *map;
};