diff --git a/src/draw/lv_draw.c b/src/draw/lv_draw.c index 1086109bee..eb4fe0ca5c 100644 --- a/src/draw/lv_draw.c +++ b/src/draw/lv_draw.c @@ -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; }