fix(draw): do not dispatch if no unit took the task

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
liamHowatt
2024-10-15 10:33:05 +02:00
committed by Gabor Kiss-Vamosi
parent a29c7dd44f
commit 3c07bd9456
+8 -9
View File
@@ -143,8 +143,13 @@ void lv_draw_finalize_task_creation(lv_layer_t * layer, lv_draw_task_t * t)
if(u->evaluate_cb) u->evaluate_cb(u, t);
u = u->next;
}
lv_draw_dispatch();
if(t->preferred_draw_unit_id == LV_DRAW_UNIT_NONE) {
LV_LOG_WARN("the draw task was not taken by any units");
t->state = LV_DRAW_TASK_STATE_READY;
}
else {
lv_draw_dispatch();
}
}
else {
/*Let the draw units set their preference score*/
@@ -322,14 +327,8 @@ lv_draw_task_t * lv_draw_get_next_available_task(lv_layer_t * layer, lv_draw_tas
if(_draw_info.unit_cnt <= 1) {
lv_draw_task_t * t = layer->draw_task_head;
while(t) {
/*Mark unsupported draw tasks as ready as no one else will consume them*/
if(t->state == LV_DRAW_TASK_STATE_QUEUED &&
t->preferred_draw_unit_id != LV_DRAW_UNIT_NONE &&
t->preferred_draw_unit_id != draw_unit_id) {
t->state = LV_DRAW_TASK_STATE_READY;
}
/*Not queued yet, leave this layer while the first task will be queued*/
else if(t->state != LV_DRAW_TASK_STATE_QUEUED) {
if(t->state != LV_DRAW_TASK_STATE_QUEUED) {
t = NULL;
break;
}