diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-10-03 12:32:52 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-10-03 12:33:11 +0300 |
commit | fab9bb700372008130e5026fa9fe5fd22ac6ec4e (patch) | |
tree | 1e83b437762697ab833bd8c22896b8733593ca5f /py/pykms/pykmsbase.cpp | |
parent | 33f343d18d5d1886dd04314bded1781c3e46f7e7 (diff) |
Rework framebuffer classes
Drop (I)MappedFramebuffer, as it doesn't really provide any value, and
have most of the methods be present in IFramebuffer with default
exception throwing implementation.
This gives us simpler way to use the framebuffers, as almost always we
can just use a pointer to IFramebuffer.
Diffstat (limited to 'py/pykms/pykmsbase.cpp')
-rw-r--r-- | py/pykms/pykmsbase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp index e53fe54..258167a 100644 --- a/py/pykms/pykmsbase.cpp +++ b/py/pykms/pykmsbase.cpp @@ -102,12 +102,12 @@ void init_pykmsbase(py::module &m) py::class_<Framebuffer>(m, "Framebuffer", py::base<DrmObject>()) ; - py::class_<MappedFramebuffer>(m, "MappedFramebuffer", py::base<Framebuffer>()) - .def_property_readonly("width", &MappedFramebuffer::width) - .def_property_readonly("height", &MappedFramebuffer::height) + py::class_<Framebuffer>(m, "Framebuffer", py::base<Framebuffer>()) + .def_property_readonly("width", &Framebuffer::width) + .def_property_readonly("height", &Framebuffer::height) ; - py::class_<DumbFramebuffer>(m, "DumbFramebuffer", py::base<MappedFramebuffer>()) + py::class_<DumbFramebuffer>(m, "DumbFramebuffer", py::base<Framebuffer>()) .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>(), @@ -119,7 +119,7 @@ void init_pykmsbase(py::module &m) .def("offset", &DumbFramebuffer::offset) ; - py::class_<ExtFramebuffer>(m, "ExtFramebuffer", py::base<MappedFramebuffer>()) + py::class_<ExtFramebuffer>(m, "ExtFramebuffer", py::base<Framebuffer>()) .def(py::init<Card&, uint32_t, uint32_t, PixelFormat, vector<int>, vector<uint32_t>, vector<uint32_t>>(), py::keep_alive<1, 2>()) // Keep Card alive until this is destructed ; |