summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--py/pykmsbase.cpp7
-rw-r--r--py/pykmsutil.cpp6
2 files changed, 8 insertions, 5 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>(),
diff --git a/py/pykmsutil.cpp b/py/pykmsutil.cpp
index ab9f5a8..b3b7594 100644
--- a/py/pykmsutil.cpp
+++ b/py/pykmsutil.cpp
@@ -39,11 +39,11 @@ void init_pykmstest(py::module &m)
;
// Use lambdas to handle IMappedFramebuffer
- m.def("draw_test_pattern", [](DumbFramebuffer& fb) { draw_test_pattern(fb); } );
- m.def("draw_color_bar", [](DumbFramebuffer& fb, int old_xpos, int xpos, int width) {
+ m.def("draw_test_pattern", [](MappedFramebuffer& fb) { draw_test_pattern(fb); } );
+ m.def("draw_color_bar", [](MappedFramebuffer& fb, int old_xpos, int xpos, int width) {
draw_color_bar(fb, old_xpos, xpos, width);
} );
- m.def("draw_rect", [](DumbFramebuffer& fb, uint32_t x, uint32_t y, uint32_t w, uint32_t h, RGB color) {
+ m.def("draw_rect", [](MappedFramebuffer& fb, uint32_t x, uint32_t y, uint32_t w, uint32_t h, RGB color) {
draw_rect(fb, x, y, w, h, color);
} );
}