Skip to content

Commit

Permalink
Leave code comments for later handling
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed May 7, 2024
1 parent 734390d commit 3ff2d1a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions generic/LVGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ struct LVGLWidget<BaseWidget>::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,);

Expand Down Expand Up @@ -208,6 +207,8 @@ struct LVGLWidget<BaseWidget>::PrivateData {

textureSize = Size<uint>(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<uint>& rect);
Expand Down Expand Up @@ -254,6 +255,9 @@ struct LVGLWidget<BaseWidget>::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<uint>(evthis->updatedArea.x1,
evthis->updatedArea.y1,
evthis->updatedArea.x2 - evthis->updatedArea.x1,
Expand Down Expand Up @@ -318,6 +322,7 @@ void LVGLWidget<BaseWidget>::onDisplay()
const int32_t height = static_cast<int32_t>(BaseWidget::getHeight());

#if 0
// TODO see what is really needed here..
glColor4f(1.f, 1.f, 1.f, 1.f);
// glClearColor();
glBegin(GL_QUADS);
Expand Down Expand Up @@ -627,7 +632,7 @@ LVGLWidget<TopLevelWidget>::~LVGLWidget()
template <>
void LVGLWidget<TopLevelWidget>::PrivateData::repaint(const Rectangle<uint>& rect)
{
self->repaint(/*rect*/);
self->repaint(rect);
}

template class LVGLWidget<TopLevelWidget>;
Expand Down

0 comments on commit 3ff2d1a

Please sign in to comment.