mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
feat(refr): add details on rendering_in_progress ASSERT cause (#6450)
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
This commit is contained in:
parent
7f7a748a10
commit
1e2b1988aa
@ -254,6 +254,17 @@ void _lv_inv_area(lv_display_t * disp, const lv_area_t * area_p)
|
||||
if(!disp) return;
|
||||
if(!lv_display_is_invalidation_enabled(disp)) return;
|
||||
|
||||
/**
|
||||
* There are two reasons for this issue:
|
||||
* 1.LVGL API is being used across threads, such as modifying widget properties in another thread
|
||||
* or within an interrupt handler during the main thread rendering process.
|
||||
* 2.User-customized widget modify widget properties/styles again within the DRAW event.
|
||||
*
|
||||
* Therefore, ensure that LVGL is used in a single-threaded manner, or refer to
|
||||
* documentation: https://docs.lvgl.io/master/porting/os.html for proper locking mechanisms.
|
||||
* Additionally, ensure that only drawing-related tasks are performed within the DRAW event,
|
||||
* and move widget property/style modifications to other events.
|
||||
*/
|
||||
LV_ASSERT_MSG(!disp->rendering_in_progress, "Invalidate area is not allowed during rendering.");
|
||||
|
||||
/*Clear the invalidate buffer if the parameter is NULL*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user