lv_draw_private.h
API reference for lv_draw_private.h
See Also: Public APIThis is the private implementation. See the public header for the stable interface.lv_draw.h
Summary
Structs
struct
_lv_draw_task_t
Modified by NXP in 2024
| Member | Type | Description |
|---|---|---|
next | lv_draw_task_t * | |
type | lv_draw_task_type_t | |
area | lv_area_t | The area where to draw |
_real_area | lv_area_t | The real draw area. E.g. for shadow, outline, or transformed images it's different from area |
clip_area_original | lv_area_t | The original area which is updated |
clip_area | lv_area_t | The clip area of the layer is saved here when the draw task is created. As the clip area of the layer can be changed as new draw tasks are added its current value needs to be saved. Therefore during drawing the layer's clip area shouldn't be used as it might be already changed for other draw tasks. |
target_layer | lv_layer_t * | |
draw_unit | lv_draw_unit_t * | |
state | volatile int | |
draw_dsc | void * | int instead of lv_draw_task_state_t to be sure its atomic |
opa | lv_opa_t | Opacity of the layer |
preferred_draw_unit_id | uint8_t | The ID of the draw_unit which should take this task |
preference_score | uint8_t | Set to which extent preferred_draw_unit_id is good at this task. 80: means 20% better (faster) than software rendering 100: the default value 110: means 10% worse (slower) than software rendering |
struct
_lv_draw_mask_t
| Member | Type | Description |
|---|---|---|
user_data | void * |
struct
_lv_draw_unit_t
| Member | Type | Description |
|---|---|---|
next | lv_draw_unit_t * | |
name | const char * | Name and ID of the draw unit, for debugging purposes only. |
idx | int32_t | |
dispatch_cb | int32_t(*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) | Called to try to assign a draw task to itself. lv_draw_get_next_available_task can be used to get an independent draw task. A draw task should be assign only if the draw unit can draw it too |
evaluate_cb | int32_t(*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) | |
wait_for_finish_cb | int32_t(*)(lv_draw_unit_t *draw_unit) | Called to signal the unit to complete all tasks in order to return their ready status. This callback can be implemented in case of asynchronous task processing. Below is an example to show the difference between synchronous and asynchronous: Synchronous: LVGL thread DRAW thread HW task1 --> submit --> Receive task1 wait_for_finish() <– task1->state = READY <– Complete task1 task2 --> submit --> Receive task2 wait_for_finish() task2->state = READY <– Complete task2 task3 --> submit --> Receive task3 wait_for_finish() <– task3->state = READY <– Complete task3 task4 --> submit --> Receive task4 wait_for_finish() <– task4->state = READY <– Complete task4 NO MORE TASKS Asynchronous: LVGL thread DRAW thread HW is IDLE task1 --> queue task1 submit --> Receive task1 task2 --> queue task2 is BUSY (with task1) task3 --> queue task3 still BUSY (with task1) task4 --> queue task4 becomes IDLE <– task1->state = READY <– Complete task1 submit --> Receive task2, task3, task4 NO MORE TASKS wait_for_finish_cb() wait_for_finish() <– Complete task2, task3, task4 <– task2->state = READY <– <– task3->state = READY <– <– task4->state = READY <– |
delete_cb | int32_t(*)(lv_draw_unit_t *draw_unit) | Called to delete draw unit. |
event_cb | void(*)(lv_event_t *event) | Called when an event is sent to the draw unit. |
struct
lv_draw_global_info_t
| Member | Type | Description |
|---|---|---|
unit_head | lv_draw_unit_t * | |
unit_cnt | uint32_t | |
used_memory_for_layers | uint32_t | |
sync | lv_thread_sync_t | |
circle_cache_mutex | lv_mutex_t | |
task_running | bool |
Dependencies
Indirect dependencies
lv_anim.hlv_area.hlv_array.hlv_assert.hlv_bidi.hlv_cache_class.hlv_cache_entry.hlv_cache_instance.hlv_cache_lru_ll.hlv_cache_lru_rb.hlv_cache_private.hlv_cache_sc_da.hlv_color.hlv_color_op.hlv_conf_internal.hlv_conf_kconfig.hlv_draw_buf.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_image_cache.hlv_image_decoder.hlv_image_dsc.hlv_image_header_cache.hlv_layout.hlv_ll.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_os.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_pthread.hlv_sprintf.hlv_string.hlv_style.hlv_style_gen.hlv_symbol_def.hlv_text.hlv_tick.hlv_timer.hlv_types.h
How is this guide?
Last updated on