Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/engines/xrender_x11 Modified Files: evas_engine_image.c evas_engine_xrender.c Log Message: fix edge interpolation for images with xrender and a segv for font rendering if multiple engines dont agree on ext data for fonts =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/xrender_x11/evas_engine_image.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- evas_engine_image.c 15 Jan 2006 06:21:05 -0000 1.2 +++ evas_engine_image.c 17 Apr 2006 01:57:11 -0000 1.3 @@ -279,7 +279,7 @@ ww = w; hh = h; RECTS_CLIP_TO_RECT(x, y, ww, hh, 0, 0, im->w, im->h); old_surface = im->surface; - im->surface = _xr_render_surface_new(old_surface->xinf, w, h, old_surface->fmt, old_surface->alpha); + im->surface = _xr_render_surface_new(old_surface->xinf, w + 1, h + 1, old_surface->fmt, old_surface->alpha); if (im->surface) _xr_render_surface_copy(old_surface, im->surface, 0, 0, 0, 0, ww, hh); _xr_render_surface_free(old_surface); @@ -451,11 +451,11 @@ old_surface = im->surface; im->surface = NULL; if (im->alpha) - im->surface = _xr_render_surface_new(im->xinf, im->w, im->h, im->xinf->fmt32, 1); + im->surface = _xr_render_surface_new(im->xinf, im->w + 1, im->h + 1, im->xinf->fmt32, 1); else - im->surface = _xr_render_surface_new(im->xinf, im->w, im->h, im->xinf->fmt24, 0); + im->surface = _xr_render_surface_new(im->xinf, im->w + 1, im->h + 1, im->xinf->fmt24, 0); if (im->surface) - _xr_render_surface_copy(old_surface, im->surface, 0, 0, 0, 0, im->w, im->h); + _xr_render_surface_copy(old_surface, im->surface, 0, 0, 0, 0, im->w + 1, im->h + 1); _xr_render_surface_free(old_surface); } if (im->updates) @@ -517,14 +517,27 @@ } if (im->alpha) { - im->surface = _xr_render_surface_new(im->xinf, im->w, im->h, im->xinf->fmt32, 1); + im->surface = _xr_render_surface_new(im->xinf, im->w + 1, im->h + 1, im->xinf->fmt32, 1); _xr_render_surface_argb_pixels_fill(im->surface, im->w, im->h, data, 0, 0, im->w, im->h); } else { - im->surface = _xr_render_surface_new(im->xinf, im->w, im->h, im->xinf->fmt24, 0); + im->surface = _xr_render_surface_new(im->xinf, im->w + 1, im->h + 1, im->xinf->fmt24, 0); _xr_render_surface_rgb_pixels_fill(im->surface, im->w, im->h, data, 0, 0, im->w, im->h); } + /* fill right and bottom pixel so interpolation works right */ + _xr_render_surface_copy(im->surface, im->surface, + im->w - 1, 0, + im->w, 0, + 1, im->h); + _xr_render_surface_copy(im->surface, im->surface, + 0, im->h - 1, + 0, im->h, + im->w, 1); + _xr_render_surface_copy(im->surface, im->surface, + im->w - 1, im->h - 1, + im->w, im->h, + 1, 1); if ((im->im) && (!im->dirty)) { evas_common_image_unref(im->im); =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/xrender_x11/evas_engine_xrender.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- evas_engine_xrender.c 16 Apr 2006 17:04:36 -0000 1.3 +++ evas_engine_xrender.c 17 Apr 2006 01:57:11 -0000 1.4 @@ -360,10 +360,17 @@ xf.matrix[2][0] = 0; xf.matrix[2][1] = 0; xf.matrix[2][2] = 1; - trs = _xr_render_surface_new(srs->xinf, sw, sh, srs->fmt, srs->alpha); + trs = _xr_render_surface_new(srs->xinf, sw + 1, sh + 1, srs->fmt, srs->alpha); XRenderSetPictureTransform(srs->xinf->disp, srs->pic, &xf); XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, mask, trs->pic, sx, sy, 0, 0, 0, 0, sw, sh); + /* fill right and bottom pixel so interpolation works right */ + XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, mask, + trs->pic, sx + sw, sy, 0, 0, sw, 0, 1, sh); + XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, mask, + trs->pic, sx, sy + sh, 0, 0, 0, sh, sw + 1, 1); + XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, mask, + trs->pic, sx + sw, sy, 0, 0, sw, 0, 1, sh); mask = 0; } } ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs