add MASK_AREA_DEBUG option

This commit is contained in:
Gabor Kiss-Vamosi
2019-05-09 06:04:03 +02:00
parent 0f6f2accb6
commit c31ab099f7

View File

@@ -14,6 +14,7 @@
#include "../lv_misc/lv_task.h"
#include "../lv_misc/lv_mem.h"
#include "../lv_misc/lv_gc.h"
#include "../lv_draw/lv_draw_basic.h"
#if defined(LV_GC_INCLUDE)
#include LV_GC_INCLUDE
@@ -22,6 +23,8 @@
/*********************
* DEFINES
*********************/
/* Draw translucent random colored areas on the invalidated (redrawn) areas*/
#define MASK_AREA_DEBUG 0
/**********************
* TYPEDEFS
@@ -359,8 +362,7 @@ static void lv_refr_area_part(const lv_area_t * area_p)
/*In non double buffered mode, before rendering the next part wait until the previous image is
* flushed*/
if(lv_disp_is_double_buf(disp_refr) == false) {
while(vdb->flushing)
;
while(vdb->flushing);
}
lv_obj_t * top_p;
@@ -501,8 +503,13 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
/* Redraw the object */
obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN);
// usleep(5 * 1000); /*DEBUG: Wait after every object draw to see the order of drawing*/
#if MASK_AREA_DEBUG
static lv_color_t debug_color = LV_COLOR_RED;
lv_draw_fill(&obj_ext_mask, &obj_ext_mask, debug_color, LV_OPA_50);
debug_color.full *= 17;
debug_color.full += 0xA1;
#endif
/*Create a new 'obj_mask' without 'ext_size' because the children can't be visible there*/
lv_obj_get_coords(obj, &obj_area);
union_ok = lv_area_intersect(&obj_mask, mask_ori_p, &obj_area);