When a new internal buffer (VDB) must be sent to the display, the flush_cb callback is called.
Then user has to call lv_disp_flush_ready() when transfer is finished.
Internally, there are some cases where LVGL waits for the end of buffer transmission.
This wait is implemented as an active wait:
while(vdb->flushing);
The feature request is to add a new callback that would be called by LVGL just before entering these waiting loops allowing the user to suspend the execution of LVGL task (when LVGL is used with an OS).
So, we would have the following sequencing:
- A new VDB is ready
- LVGL calls flush_cb
- Buffer transmission is started
- LVGL continues to render next buffer (dual buffer)
- LVGL has finished to render the second buffer
- Before entering the wait loop, LVGL call this new callback
- Within this callback LVGL execution is suspended
- Buffer transmission finishes
- LVGL execution is resumed
- lv_disp_flush_ready() is called
- …