diff options
Diffstat (limited to 'libkms++')
-rw-r--r-- | libkms++/dumbframebuffer.cpp | 3 | ||||
-rw-r--r-- | libkms++/dumbframebuffer.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libkms++/dumbframebuffer.cpp b/libkms++/dumbframebuffer.cpp index 9de02da..c64010a 100644 --- a/libkms++/dumbframebuffer.cpp +++ b/libkms++/dumbframebuffer.cpp @@ -91,6 +91,7 @@ void DumbFramebuffer::Create() 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", @@ -117,7 +118,7 @@ void DumbFramebuffer::Create() /* 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); diff --git a/libkms++/dumbframebuffer.h b/libkms++/dumbframebuffer.h index c836e39..49cf8a0 100644 --- a/libkms++/dumbframebuffer.h +++ b/libkms++/dumbframebuffer.h @@ -21,6 +21,7 @@ public: 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(); @@ -29,6 +30,7 @@ private: uint32_t handle; uint32_t size; uint32_t stride; + uint32_t offset; uint8_t *map; }; |