[EGIT] [core/efl] master 01/01: evas: fix bug in evas gl texture. Summary: bytecount always 1, 2, 4. so changed for simple code.
jypark pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4a4d5f27053944bd1da8a65e36d3ab0c073ab8cc commit 4a4d5f27053944bd1da8a65e36d3ab0c073ab8cc Author: Ji-Youn Park Date: Mon May 11 20:07:12 2015 +0900 evas: fix bug in evas gl texture. Summary: bytecount always 1,2,4. so changed for simple code. --- src/modules/evas/engines/gl_common/evas_gl_texture.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c index e71b8e4..c92a374 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c @@ -1047,10 +1047,7 @@ evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int { glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } - if ((bytes_count == 1) || (bytes_count == 2)) - glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count); - else - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count); // printf("tex upload %ix%i\n", im->cache_entry.w, im->cache_entry.h); // +-+ @@ -1373,10 +1370,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) { glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } -if ((bytes_count == 1) || (bytes_count == 2)) - glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count); -else - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); +glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count); _tex_sub_2d(tex->gc, u, tex->ty, EVAS_GL_TILE_SIZE, EVAS_GL_TILE_SIZE, fmt, tex->ptt->dataformat, out); --
[EGIT] [core/efl] master 01/01: evas: fix bug in evas gl texture.
jypark pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9bf8a0e56b72fed562a127f5af3e91eaeaa33fd9 commit 9bf8a0e56b72fed562a127f5af3e91eaeaa33fd9 Author: Ji-Youn Park Date: Mon May 11 19:08:12 2015 +0900 evas: fix bug in evas gl texture. Summary: If the pixel size of image is not 32 bit like EVAS_COLORSPACE_AGRY88, GL_UNPACK_ALIGNMENT have to be changed. --- src/modules/evas/engines/gl_common/evas_gl_texture.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c index 5c1c07f..e71b8e4 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c @@ -1047,7 +1047,10 @@ evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int { glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + if ((bytes_count == 1) || (bytes_count == 2)) + glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count); + else + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); // printf("tex upload %ix%i\n", im->cache_entry.w, im->cache_entry.h); // +-+ @@ -1370,7 +1373,10 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) { glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } -glPixelStorei(GL_UNPACK_ALIGNMENT, 4); +if ((bytes_count == 1) || (bytes_count == 2)) + glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count); +else + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); _tex_sub_2d(tex->gc, u, tex->ty, EVAS_GL_TILE_SIZE, EVAS_GL_TILE_SIZE, fmt, tex->ptt->dataformat, out); --