summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-11-26 17:39:27 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-11-26 18:23:52 +0900
commit596f3cc7e8afe6e8d38e0a37fe3f98f99bee4e8c (patch)
treeff4da170493e513ede59ab1aa0721bbb1efcb40e
parentd5de57af25230165f5bfb91af9478644bfbe460d (diff)
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
-rw-r--r--src/lib/evas/common/evas_map_image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/evas/common/evas_map_image.c b/src/lib/evas/common/evas_map_image.c
index 01573d2c95..4a328393e1 100644
--- a/src/lib/evas/common/evas_map_image.c
+++ b/src/lib/evas/common/evas_map_image.c
@@ -281,7 +281,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
281 spans[yp].span[i].col[1] = col[order[1]]; 281 spans[yp].span[i].col[1] = col[order[1]];
282 282
283 //Outside of the clipper 283 //Outside of the clipper
284 if ((spans[yp].span[i].x[0] >= (cx + cw)) || 284 if ((spans[yp].span[i].x[0] > (cx + cw)) ||
285 (spans[yp].span[i].x[1] < cx)) 285 (spans[yp].span[i].x[1] < cx))
286 spans[yp].span[i].x[0] = -1; 286 spans[yp].span[i].x[0] = -1;
287 else 287 else
@@ -306,7 +306,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
306 spans[yp].span[i].col[1] = col[order[1]]; 306 spans[yp].span[i].col[1] = col[order[1]];
307 307
308 //Outside of the clipper 308 //Outside of the clipper
309 if ((spans[yp].span[i].x[0] >= (cx + cw)) || 309 if ((spans[yp].span[i].x[0] > (cx + cw)) ||
310 (spans[yp].span[i].x[1] < cx)) 310 (spans[yp].span[i].x[1] < cx))
311 spans[yp].span[i].x[0] = -1; 311 spans[yp].span[i].x[0] = -1;
312 else 312 else
@@ -327,7 +327,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
327 spans[yp].span[i].col[1] = col[order[3]]; 327 spans[yp].span[i].col[1] = col[order[3]];
328 328
329 //Outside of the clipper 329 //Outside of the clipper
330 if ((spans[yp].span[i].x[0] >= (cx + cw)) || 330 if ((spans[yp].span[i].x[0] > (cx + cw)) ||
331 (spans[yp].span[i].x[1] < cx)) 331 (spans[yp].span[i].x[1] < cx))
332 spans[yp].span[i].x[0] = -1; 332 spans[yp].span[i].x[0] = -1;
333 else 333 else