hermet pushed a commit to branch efl-1.10. http://git.enlightenment.org/core/efl.git/commit/?id=f497beea308f7fd42000b78a6876b41d4b99b64c
commit f497beea308f7fd42000b78a6876b41d4b99b64c Author: ChunEon Park <[email protected]> Date: Fri Jun 27 21:29:24 2014 +0900 evas/gl: improve the rendering quality. To avoid texture bleeding in the texture atlas, we adjust texture uv point as much as a half uv point. Especially, this improves the rendering quality when the image has the border area. Unless apply this patch, You might find the rendering result is different with software backened, if the image has the borders. In the software backened, the border line was clear but the gl wasn't. because the border line was interpolated so the rendering result was not the one we expected. @fix --- src/modules/evas/engines/gl_common/evas_gl_context.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index aaabc78..fd8bbc9 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -1867,6 +1867,19 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc, ty2 = ((double)(offsety) + sy + sh) / (double)pt->h; } + /* To avoid texture bleeding in the texture atlas, + we adjust texture uv point as much as a half uv point. + Especially, This improves the rendering quality when the image has the + border area. */ + if (smooth) + { + GLfloat txhu, txhv; //texture uv half point + txhu = (0.5f * (tx2 - tx1)) / (GLfloat) sw; + txhv = (0.5f * (ty2 - ty1)) / (GLfloat) sh; + tx1 += txhu; tx2 -= txhu; + ty1 += txhv; ty2 -= txhv; + } + PUSH_VERTEX(pn, x , y , 0); PUSH_VERTEX(pn, x + w, y , 0); PUSH_VERTEX(pn, x , y + h, 0); --
