From 93781909bb799e4fbaeec298fb71659b9984324a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 17 Dec 2018 14:34:26 +0100 Subject: [PATCH] lv_draw_label: optimization for long texts (uncomment some lines) --- lv_draw/lv_draw_label.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lv_draw/lv_draw_label.c b/lv_draw/lv_draw_label.c index 134323abc..d8b0c0e29 100644 --- a/lv_draw/lv_draw_label.c +++ b/lv_draw/lv_draw_label.c @@ -129,7 +129,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st while(i < line_end) { letter = lv_txt_encoded_next(txt, &i); -// if(pos.y + line_height < mask->y1) continue; + if(pos.y + line_height < mask->y1) continue; /*Handle the re-color command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { @@ -200,7 +200,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st /*Go the next line position*/ pos.y += line_height; -// if(pos.y > mask->y2) return; + if(pos.y > mask->y2) return; } }