From 3ff2d1a39836f1e1efcb7dcf1f6feefddc67e005 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 7 May 2024 11:36:40 +0200 Subject: [PATCH] Leave code comments for later handling Signed-off-by: falkTX --- generic/LVGL.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/generic/LVGL.cpp b/generic/LVGL.cpp index 9fafb20..55094ad 100644 --- a/generic/LVGL.cpp +++ b/generic/LVGL.cpp @@ -123,8 +123,7 @@ struct LVGLWidget::PrivateData { lv_indev_set_group(indev, group); } - #if defined(DGL_CAIRO) - #elif defined(DGL_OPENGL) + #ifdef DGL_OPENGL glGenTextures(1, &textureId); DISTRHO_SAFE_ASSERT_RETURN(textureId != 0,); @@ -208,6 +207,8 @@ struct LVGLWidget::PrivateData { textureSize = Size(width, height); lv_display_set_buffers(display, textureData, nullptr, data_size, LV_DISPLAY_RENDER_MODE_DIRECT); + + // TODO create full-size cairo texture here } void repaint(const Rectangle& rect); @@ -254,6 +255,9 @@ struct LVGLWidget::PrivateData { _lv_area_join(&evthis->updatedArea, &tmp, area); } + // TODO convert to cairo texture format here, only touching updated areas + // TODO use double-buffering, touching new area before swapping and notifying flush ready + evthis->repaint(Rectangle(evthis->updatedArea.x1, evthis->updatedArea.y1, evthis->updatedArea.x2 - evthis->updatedArea.x1, @@ -318,6 +322,7 @@ void LVGLWidget::onDisplay() const int32_t height = static_cast(BaseWidget::getHeight()); #if 0 + // TODO see what is really needed here.. glColor4f(1.f, 1.f, 1.f, 1.f); // glClearColor(); glBegin(GL_QUADS); @@ -627,7 +632,7 @@ LVGLWidget::~LVGLWidget() template <> void LVGLWidget::PrivateData::repaint(const Rectangle& rect) { - self->repaint(/*rect*/); + self->repaint(rect); } template class LVGLWidget;