diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-10-03 10:33:14 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-10-03 10:33:14 +0300 |
commit | b2ecff3df3fec79047abe58dffeb48391e5463b9 (patch) | |
tree | aa2fef1823cadf9881d143bdc55b4f5c839fb319 /py/pykms | |
parent | 67bc5e8a9632028f9d5f44da9eafa38f0b59dfef (diff) |
py: move framebuffer functions to correct place
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'py/pykms')
-rw-r--r-- | py/pykms/pykmsbase.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp index bee277c..a55cf3a 100644 --- a/py/pykms/pykmsbase.cpp +++ b/py/pykms/pykmsbase.cpp @@ -147,6 +147,12 @@ void init_pykmsbase(py::module &m) py::class_<Framebuffer>(m, "Framebuffer") .def_property_readonly("width", &Framebuffer::width) .def_property_readonly("height", &Framebuffer::height) + .def_property_readonly("format", &Framebuffer::format) + .def_property_readonly("num_planes", &Framebuffer::num_planes) + .def("stride", &Framebuffer::stride) + .def("size", &Framebuffer::size) + .def("offset", &Framebuffer::offset) + .def("fd", &Framebuffer::prime_fd) // XXX pybind11 doesn't support a base object (DrmObject) with custom holder-type, // and a subclass with standard holder-type. @@ -162,11 +168,6 @@ void init_pykmsbase(py::module &m) py::keep_alive<1, 2>()) // Keep Card alive until this is destructed .def(py::init<Card&, uint32_t, uint32_t, PixelFormat>(), py::keep_alive<1, 2>()) // Keep Card alive until this is destructed - .def_property_readonly("format", &DumbFramebuffer::format) - .def_property_readonly("num_planes", &DumbFramebuffer::num_planes) - .def("fd", &DumbFramebuffer::prime_fd) - .def("stride", &DumbFramebuffer::stride) - .def("offset", &DumbFramebuffer::offset) ; py::class_<DmabufFramebuffer, Framebuffer>(m, "DmabufFramebuffer") |