static inline int _add_redraw(list_t *rects, int max_w, int max_h, int x, int y, int w, int h) { rect_node_t *rn; if ((w <= 0) || (h <= 0)) return 0; RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, max_w, max_h); if ((w <= 0) || (h <= 0)) return 0; x >>= 1; y >>= 1; w += 2; w >>= 1; h += 2; h >>= 1; rn = (rect_node_t *)rect_list_node_pool_get(); rn->_lst = list_node_zeroed; rect_init(&rn->rect, x, y, w, h); //INF("ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h); //testing on my core2 duo desktop - fuzz of 32 or 48 is best. #define FUZZ 32 rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn, FUZZ * FUZZ, FUZZ * FUZZ); return 1; }
inline void rect_list_append(list_t *rects, const rect_t r) { rect_node_t *rect_node; rect_node = (rect_node_t *)rect_list_node_pool_get(); rect_node->rect = r; rect_node->_lst = list_node_zeroed; rect_list_append_node(rects, (list_node_t *)rect_node); }
static inline int _add_redraw(list_t *rects, int x, int y, int w, int h) { rect_node_t *rn; /* we dont need to do this fuzz stuff - it actually creates overdraw bugs * when evas shouldnt draw at all. x >>= 1; y >>= 1; w += 2; w >>= 1; h += 2; h >>= 1; */ rn = (rect_node_t *)rect_list_node_pool_get(); rn->_lst = list_node_zeroed; rect_init(&rn->rect, x, y, w, h); //INF("ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h); //testing on my core2 duo desktop - fuzz of 32 or 48 is best. #define FUZZ 32 rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn, FUZZ * FUZZ, FUZZ * FUZZ); return 1; }