diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-11-22 12:52:14 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-11-22 12:52:14 +0200 |
commit | 1e96518a1ee7fc65f212fa1fa76805003bed34e1 (patch) | |
tree | 3d1ca991f22b23e678b286deaf7fe11e9f14c960 /py/pykmsbase.cpp | |
parent | cb747ea27451266c6d340a018aedcd0675a18b00 (diff) |
py: Add MappedFramebuffer and use it
Add MappedFramebuffer to python bindings and use it for the draw
functions.
Looks like recent pybind11 versions have better multi-inheritance
support, so all this need to be revisited after updating pybind11.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'py/pykmsbase.cpp')
-rw-r--r-- | py/pykmsbase.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/py/pykmsbase.cpp b/py/pykmsbase.cpp index 3ce5676..9f20fdb 100644 --- a/py/pykmsbase.cpp +++ b/py/pykmsbase.cpp @@ -87,10 +87,13 @@ void init_pykmsbase(py::module &m) .def_property_readonly("data", &Blob::data) ; - py::class_<Framebuffer>(m, "Framebuffer", py::base<DrmObject>()) + py::class_<Framebuffer>(m, "Framebuffer", py::base<DrmObject>()) ; - py::class_<DumbFramebuffer>(m, "DumbFramebuffer", py::base<Framebuffer>()) + py::class_<MappedFramebuffer>(m, "MappedFramebuffer", py::base<Framebuffer>()) + ; + + py::class_<DumbFramebuffer>(m, "DumbFramebuffer", py::base<MappedFramebuffer>()) .def(py::init<Card&, uint32_t, uint32_t, const string&>(), py::keep_alive<1, 2>()) // Keep Card alive until this is destructed .def(py::init<Card&, uint32_t, uint32_t, PixelFormat>(), |