diff --git a/lv_conf_template.h b/lv_conf_template.h index b1ecea022..7c4e2ec0f 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -192,6 +192,9 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ * Requires LV_MEM_CUSTOM = 0*/ #define LV_USE_MEM_MONITOR 0 +/*1: Draw random colored rectangles over the redrawn areas*/ +#define LV_USE_REFR_DEBUG 0 + /*Change the built in (v)snprintf functions*/ #define LV_SPRINTF_CUSTOM 0 #if LV_SPRINTF_CUSTOM diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index 078967c82..725113155 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -25,8 +25,6 @@ /********************* * DEFINES *********************/ -/*Draw translucent random colored areas on the invalidated (redrawn) areas*/ -#define MASK_AREA_DEBUG 0 /********************** * TYPEDEFS @@ -688,7 +686,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) lv_event_send(obj, LV_EVENT_DRAW_MAIN, &obj_ext_mask); lv_event_send(obj, LV_EVENT_DRAW_MAIN_END, &obj_ext_mask); -#if MASK_AREA_DEBUG +#if LV_USE_REFR_DEBUG lv_color_t debug_color = lv_color_make(lv_rand(0, 0xFF), lv_rand(0, 0xFF), lv_rand(0, 0xFF)); lv_draw_rect_dsc_t draw_dsc; lv_draw_rect_dsc_init(&draw_dsc); diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index 0e6c57389..c5456fce0 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -504,6 +504,15 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ # endif #endif +/*1: Draw random colored rectangles over the redrawn areas*/ +#ifndef LV_USE_REFR_DEBUG +# ifdef CONFIG_LV_USE_REFR_DEBUG +# define LV_USE_REFR_DEBUG CONFIG_LV_USE_REFR_DEBUG +# else +# define LV_USE_REFR_DEBUG 0 +# endif +#endif + /*Change the built in (v)snprintf functions*/ #ifndef LV_SPRINTF_CUSTOM # ifdef CONFIG_LV_SPRINTF_CUSTOM