mirror of
https://github.com/lvgl/lvgl.git
synced 2025-02-04 07:13:00 +08:00
feat(hal): add render_start_cb to disp_drv (#3274)
* feat(hal): add render_start_cb to disp_drv * update doc for render_start_cb * Update docs/porting/display.md * remove disp_refr parameter Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
parent
ef08f1c0fe
commit
0fdd5d6449
@ -109,6 +109,7 @@ It can be used if the display controller can refresh only areas with specific he
|
|||||||
This way the buffers used in `lv_disp_draw_buf_t` can be smaller to hold only the required number of bits for the given area size. Note that rendering with `set_px_cb` is slower than normal rendering.
|
This way the buffers used in `lv_disp_draw_buf_t` can be smaller to hold only the required number of bits for the given area size. Note that rendering with `set_px_cb` is slower than normal rendering.
|
||||||
- `monitor_cb` A callback function that tells how many pixels were refreshed and in how much time. Called when the last chunk is rendered and sent to the display.
|
- `monitor_cb` A callback function that tells how many pixels were refreshed and in how much time. Called when the last chunk is rendered and sent to the display.
|
||||||
- `clean_dcache_cb` A callback for cleaning any caches related to the display.
|
- `clean_dcache_cb` A callback for cleaning any caches related to the display.
|
||||||
|
- `render_start_cb` A callback function that notifies the display driver that rendering has started. It also could be used to wait for VSYNC to start rendering. It's useful if rendering is faster than a VSYNC period.
|
||||||
|
|
||||||
LVGL has built-in support to several GPUs (see `lv_conf.h`) but if something else is required these functions can be used to make LVGL use a GPU:
|
LVGL has built-in support to several GPUs (see `lv_conf.h`) but if something else is required these functions can be used to make LVGL use a GPU:
|
||||||
- `gpu_fill_cb` fill an area in the memory with a color.
|
- `gpu_fill_cb` fill an area in the memory with a color.
|
||||||
|
@ -519,6 +519,11 @@ static void lv_refr_areas(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Notify the display driven rendering has started*/
|
||||||
|
if(disp_refr->driver->render_start_cb) {
|
||||||
|
disp_refr->driver->render_start_cb(disp_refr->driver);
|
||||||
|
}
|
||||||
|
|
||||||
disp_refr->driver->draw_buf->last_area = 0;
|
disp_refr->driver->draw_buf->last_area = 0;
|
||||||
disp_refr->driver->draw_buf->last_part = 0;
|
disp_refr->driver->draw_buf->last_part = 0;
|
||||||
disp_refr->rendering_in_progress = true;
|
disp_refr->rendering_in_progress = true;
|
||||||
|
@ -133,6 +133,9 @@ typedef struct _lv_disp_drv_t {
|
|||||||
/** OPTIONAL: called when driver parameters are updated */
|
/** OPTIONAL: called when driver parameters are updated */
|
||||||
void (*drv_update_cb)(struct _lv_disp_drv_t * disp_drv);
|
void (*drv_update_cb)(struct _lv_disp_drv_t * disp_drv);
|
||||||
|
|
||||||
|
/** OPTIONAL: called when start rendering */
|
||||||
|
void (*render_start_cb)(struct _lv_disp_drv_t * disp_drv);
|
||||||
|
|
||||||
/** On CHROMA_KEYED images this color will be transparent.
|
/** On CHROMA_KEYED images this color will be transparent.
|
||||||
* `LV_COLOR_CHROMA_KEY` by default. (lv_conf.h)*/
|
* `LV_COLOR_CHROMA_KEY` by default. (lv_conf.h)*/
|
||||||
lv_color_t color_chroma_key;
|
lv_color_t color_chroma_key;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user