fix(sdl): make it work with canvas rendering too

SDL won't take non-display refresh ralted tasks.
This commit is contained in:
Gabor Kiss-Vamosi 2024-10-03 15:27:24 +02:00
parent 780807029f
commit 5d9064c17e

View File

@ -167,6 +167,10 @@ static int32_t evaluate(lv_draw_unit_t * draw_unit, lv_draw_task_t * task)
{
LV_UNUSED(draw_unit);
/*If not refreshing the display probably it's a canvas rendering
*which his not support in SDL as it's not a texture.*/
if(lv_refr_get_disp_refreshing() == NULL) return 0;
if(((lv_draw_dsc_base_t *)task->draw_dsc)->user_data == NULL) {
task->preference_score = 0;
task->preferred_draw_unit_id = DRAW_UNIT_ID_SDL;