diff --git a/lv_conf_templ.h b/lv_conf_templ.h index 9add140553..7bf1041e8d 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -62,6 +62,8 @@ /*Screen refresh settings*/ #define LV_REFR_PERIOD 50 /*Screen refresh period in milliseconds*/ #define LV_INV_FIFO_SIZE 32 /*The average count of objects on a screen */ +#define LV_INV_FULL_ROW 0 /*1: Force invalid areas to be as wide as the screen*/ +#define LV_INV_FULL_COL 0 /*1: Force invalid areas to be as tall as the screen*/ /*================= Misc. setting diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 384d007a1c..4e50d3b50e 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -96,15 +96,25 @@ void lv_inv_area(const lv_area_t * area_p) suc = lv_area_union(&com_area, area_p, &scr_area); /*The area is truncated to the screen*/ - if(suc != false) - { + if(suc != false) { +#if LV_INV_FULL_ROW == 1 + /*Extend invalid area to be as wide as the screen*/ + com_area.x1 = 0; + com_area.x2 = LV_HOR_RES-1; +#endif + +#if LV_INV_FULL_COL == 1 + /*Extend invalid area to be as tall as the screen*/ + com_area.y1 = 0; + com_area.y2 = LV_VER_RES-1; +#endif + /*Save only if this area is not in one of the saved areas*/ uint16_t i; for(i = 0; i < inv_buf_p; i++) { if(lv_area_is_in(&com_area, &inv_buf[i].area) != false) return; } - /*Save the area*/ if(inv_buf_p < LV_INV_FIFO_SIZE) { lv_area_copy(&inv_buf[inv_buf_p].area,&com_area);