From db0dbee435677292cfb81871f054c476d384487e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 28 Jul 2023 20:39:05 +0200 Subject: [PATCH 1/4] Update ROADMAP.rst --- docs/ROADMAP.rst | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/ROADMAP.rst b/docs/ROADMAP.rst index eaa93038c..c28af6b3d 100644 --- a/docs/ROADMAP.rst +++ b/docs/ROADMAP.rst @@ -27,6 +27,7 @@ Naming and API - |uncheck| Generic `lv_date_t` and `lv_time_t` - |uncheck| Make layouts with an `lv_layout_dsc_t` instead of registering an ID + callback. (see `here `__) +- |check| Gradient with alpha Architecture ~~~~~~~~~~~~ @@ -48,11 +49,14 @@ Architecture Fragmentation is also lower if processes can completely clean up after themselves. - |check| More color formats: 24 bit, ARGB1555, ARGB4444 etc - |uncheck| Add more feature to key presses (long press, release, etc). - (see `here `__) -- |uncheck| Integrate `lv_msg` with the widgets to have an easy to use variable binding solution + (see `here `__) +- |uncheck| Variable binding. I.e create properties which can be bound to + objects and those obejcts are notified on value change. Maybe based on `lv_msg`? - |uncheck| Add GPU abstraction for display rotation - |uncheck| Replace the `read_line_cb` of the image decoders with `get_area_cb` - |uncheck| Limit the image caching size in bytes instead of image count +- |uncheck| lv_draw_buf for unified stride, buffer and cache invalidation management. `4241 `__ +- |uncheck| SVG support: integrate an SVG render library `4388 `__ Styles ~~~~~~ @@ -135,7 +139,6 @@ Drawing and rendering - |uncheck| Innter shadow - |uncheck| ARGB image stroke/grow on the alpha map - |uncheck| Real time blur -- |uncheck| Gradient with alpha Widgets @@ -152,8 +155,6 @@ Others - |uncheck| Named grid cells to allow updating layouts without touching the children (like CSS `grid-template-areas`) - |uncheck| Scene support. See `this comment `__ - |uncheck| Circle layout. #2871 -- |uncheck| Variable binding. I.e create properties which can be bound to - objects and those obejcts are notified on value change. Maybe based on `lv_msg`? - |uncheck| Consider `stagger animations `__. - |uncheck| Add custom indev type. See [here](https://github.com/lvgl/lvgl/issues/3298#issuecomment-1616706654). @@ -162,19 +163,17 @@ Ideas - Better way to reset global variables in `lv_deinit()` #3385 - `lv_array`: replace linked lists with array where possible (arrays are faster and uses less memory) -- Reconsider how to handle UTF-8 characters (allow different encoding too) and Bidi. Maybe create an abstraction for typesetting. +- Reconsider how to handle UTF-8 characters (allow different encoding too) and Bidi. Maybe create an abstraction for textshaping. - Consider direct binary font format support - Improve groups. `Discussion `__. Reconsider focusing logic. Allow having no widget selected (on web it's possible). Keep editing state in `lv_obj_t` (see `here `__). Support slider left knob focusing (see `here `__) -- lv_mem_alloc_aligned(size, align) - Speed up font decompression - Support larger images: add support for large image #1892 - Functional programming support, pure view? (see `here `__) - Style components. (see `this comment `__ -- SVG support: integrate an SVG render library - Support dot_begin and dot_middle long modes for labels - Allow matrix input for image transformation? - Radial/skew/conic gradient From 0302eaa22eb855656f65300c4353909c6a78c667 Mon Sep 17 00:00:00 2001 From: _VIFEXTech Date: Mon, 31 Jul 2023 16:21:49 +0800 Subject: [PATCH 2/4] fix(examples): fix crash caused by typos (#4419) Signed-off-by: FASTSHIFT --- examples/get_started/lv_example_get_started_2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/get_started/lv_example_get_started_2.py b/examples/get_started/lv_example_get_started_2.py index b608dd8b5..7d3cefe32 100644 --- a/examples/get_started/lv_example_get_started_2.py +++ b/examples/get_started/lv_example_get_started_2.py @@ -20,9 +20,9 @@ class CounterBtn(): if code == lv.EVENT.CLICKED: self.cnt += 1 - # Get the first child of the button which is the label and change its text - label = btn.get_child(0) - label.set_text("Button: " + str(self.cnt)) + # Get the first child of the button which is the label and change its text + label = btn.get_child(0) + label.set_text("Button: " + str(self.cnt)) counterBtn = CounterBtn() From 5167731edeb970cfc976b15c14402bc3cf8699f9 Mon Sep 17 00:00:00 2001 From: _VIFEXTech Date: Mon, 31 Jul 2023 18:38:46 +0800 Subject: [PATCH 3/4] feat(refr): use ASSERT to capture the invalidate area situation during rendering (#4410) Signed-off-by: pengyiqiang Co-authored-by: pengyiqiang --- src/core/lv_refr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index b5979b3d9..a3f5dddc6 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -247,10 +247,7 @@ void _lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) if(!disp) return; if(!lv_disp_is_invalidation_enabled(disp)) return; - if(disp->rendering_in_progress) { - LV_LOG_ERROR("detected modifying dirty areas in render"); - return; - } + LV_ASSERT_MSG(!disp->rendering_in_progress, "Invalidate area is not allowed during rendering."); /*Clear the invalidate buffer if the parameter is NULL*/ if(area_p == NULL) { From 9beca819fb584f73be2daca2d4407bc9be94e433 Mon Sep 17 00:00:00 2001 From: Peter Bee Date: Mon, 31 Jul 2023 18:46:33 +0800 Subject: [PATCH 4/4] fix(draw): Check for decoder result in sw_draw_img (#4416) Signed-off-by: Peter Bee --- src/dev/disp/lcd/lv_nuttx_lcd.c | 5 +++-- src/draw/sw/lv_draw_sw_img.c | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/dev/disp/lcd/lv_nuttx_lcd.c b/src/dev/disp/lcd/lv_nuttx_lcd.c index 9279cd29f..fe7c5eb26 100644 --- a/src/dev/disp/lcd/lv_nuttx_lcd.c +++ b/src/dev/disp/lcd/lv_nuttx_lcd.c @@ -162,11 +162,12 @@ static lv_disp_t * lcd_init(int fd, int hor_res, int ver_res) return NULL; } + uint32_t px_size = lv_color_format_get_size(lv_disp_get_color_format(disp)); #if LV_NUTTX_LCD_BUFFER_COUNT > 0 - uint32_t buf_size = hor_res * ver_res * sizeof(lv_color_t); + uint32_t buf_size = hor_res * ver_res * px_size; lv_disp_render_mode_t render_mode = LV_DISP_RENDER_MODE_FULL; #else - uint32_t buf_size = hor_res * LV_NUTTX_LCD_BUFFER_SIZE * sizeof(lv_color_t); + uint32_t buf_size = hor_res * LV_NUTTX_LCD_BUFFER_SIZE * px_size; lv_disp_render_mode_t render_mode = LV_DISP_RENDER_MODE_PARTIAL; #endif diff --git a/src/draw/sw/lv_draw_sw_img.c b/src/draw/sw/lv_draw_sw_img.c index 2f3b8413a..d4e6cc79c 100644 --- a/src/draw/sw/lv_draw_sw_img.c +++ b/src/draw/sw/lv_draw_sw_img.c @@ -168,7 +168,11 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img(lv_draw_unit_t * draw_unit, const lv_d bool transformed = draw_dsc->angle != 0 || draw_dsc->zoom != LV_ZOOM_NONE ? true : false; lv_img_decoder_dsc_t decoder_dsc; - lv_img_decoder_open(&decoder_dsc, draw_dsc->src, draw_dsc->recolor, -1); + lv_res_t res = lv_img_decoder_open(&decoder_dsc, draw_dsc->src, draw_dsc->recolor, -1); + if(res != LV_RES_OK) { + LV_LOG_ERROR("Failed to open image"); + return; + } const uint8_t * src_buf = decoder_dsc.img_data; lv_color_format_t cf = decoder_dsc.header.cf;