From: ChunEon Park Date: Wed, 26 Nov 2014 08:39:27 +0000 (+0900) Subject: evas/map: correct last 1 pixel handling in spans. X-Git-Tag: upstream/1.12.0+179+gc1eb5de~47 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7d5700312b559b8b86b14b00d6d99b5657f18fe;p=platform%2Fupstream%2Fefl.git evas/map: correct last 1 pixel handling in spans. Clipper causes the different rendering result by last 1 pixel on the width. Because the left edge x range (0 ~ (w - 1)) and right edge x range (0 ~ w) is different. This fix won't be memory over access problem even if x span position is on the end of the edge. Because the span width(x2 - x1) will be 0, and it restuls in skipping drawing. It's hardly find the problem but you can detect the subtle rendering difference when some arbitrary meshes with map is You can compare image and rectangle map drawing for this. @fix --- diff --git a/src/lib/evas/common/evas_map_image.c b/src/lib/evas/common/evas_map_image.c index 8cc83d9..69e7f5f 100644 --- a/src/lib/evas/common/evas_map_image.c +++ b/src/lib/evas/common/evas_map_image.c @@ -285,7 +285,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy spans[yp].span[i].col[1] = col[order[1]]; //Outside of the clipper - if ((spans[yp].span[i].x[0] >= (cx + cw)) || + if ((spans[yp].span[i].x[0] > (cx + cw)) || (spans[yp].span[i].x[1] < cx)) spans[yp].span[i].x[0] = -1; else @@ -310,7 +310,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy spans[yp].span[i].col[1] = col[order[1]]; //Outside of the clipper - if ((spans[yp].span[i].x[0] >= (cx + cw)) || + if ((spans[yp].span[i].x[0] > (cx + cw)) || (spans[yp].span[i].x[1] < cx)) spans[yp].span[i].x[0] = -1; else @@ -331,7 +331,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy spans[yp].span[i].col[1] = col[order[3]]; //Outside of the clipper - if ((spans[yp].span[i].x[0] >= (cx + cw)) || + if ((spans[yp].span[i].x[0] > (cx + cw)) || (spans[yp].span[i].x[1] < cx)) spans[yp].span[i].x[0] = -1; else