Exemple #1
0
EAPI int
evas_common_tilebuf_add_motion_vector(Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha __UNUSED__)
{
#ifdef EVAS_RECT_SPLIT
   list_t lr = list_zeroed;
   int num;

   num = _add_redraw(&lr, tb->outbuf_w, tb->outbuf_h, x, y, w, h);
   num += _add_redraw(&lr, tb->outbuf_w, tb->outbuf_h, x + dx, y + dy, w, h);
   while (lr.head)
     {
        list_node_t *node = rect_list_unlink_next(&lr, NULL);
        rect_list_add_split_fuzzy_and_merge(&tb->rects, node,
                                            FUZZ * FUZZ, FUZZ * FUZZ);
     }
   return num;
#else
   /* FIXME: need to actually implement motion vectors. for now it just */
   /*        implements redraws */
   int num;

   num = evas_common_tilebuf_add_redraw(tb, x, y, w, h);
   num += evas_common_tilebuf_add_redraw(tb, x + dx, y + dy, w, h);
   return num;
#endif
}
Exemple #2
0
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;
}
Exemple #3
0
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;
}