summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_texture.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-03-09 20:32:01 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-03-09 20:32:01 +0900
commitb7d1615be7cad3bd8abad77918427d9708e0772d (patch)
tree35cbed60168d56910aeec1c4846f81bcee507ecb /src/modules/evas/engines/gl_common/evas_gl_texture.c
parent1cf630f2bdedfd6b50c88ee1024b9bb03c0d1c39 (diff)
Evas GL texture: Fix invalid interpolation pixel
The pixel on the top-right of a texture was set using an invalid offset. "luckily" this never crashed but probably could have with wide single-row images. Also, the output was not perfectly correct.
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c10
1 files changed, 5 insertions, 5 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 4f0c0b3e24..0db548538a 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -1060,21 +1060,21 @@ evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int
1060 _tex_sub_2d(tex->gc, tex->x, tex->y + im->cache_entry.h, 1060 _tex_sub_2d(tex->gc, tex->x, tex->y + im->cache_entry.h,
1061 im->cache_entry.w, 1, 1061 im->cache_entry.w, 1,
1062 fmt, tex->pt->dataformat, 1062 fmt, tex->pt->dataformat,
1063 (unsigned char *) im->image.data + (((im->cache_entry.h - 1) * im->cache_entry.w)) * bytes_count); 1063 im->image.data8 + (((im->cache_entry.h - 1) * im->cache_entry.w)) * bytes_count);
1064 // xxx 1064 // xxx
1065 // xxx 1065 // xxx
1066 // o 1066 // o
1067 _tex_sub_2d(tex->gc, tex->x - 1, tex->y + im->cache_entry.h, 1067 _tex_sub_2d(tex->gc, tex->x - 1, tex->y + im->cache_entry.h,
1068 1, 1, 1068 1, 1,
1069 fmt, tex->pt->dataformat, 1069 fmt, tex->pt->dataformat,
1070 (unsigned char *) im->image.data + (((im->cache_entry.h - 1) * im->cache_entry.w)) * bytes_count); 1070 im->image.data8 + (((im->cache_entry.h - 1) * im->cache_entry.w)) * bytes_count);
1071 // xxx 1071 // xxx
1072 // xxx 1072 // xxx
1073 // o 1073 // o
1074 _tex_sub_2d(tex->gc, tex->x + im->cache_entry.w, tex->y + im->cache_entry.h, 1074 _tex_sub_2d(tex->gc, tex->x + im->cache_entry.w, tex->y + im->cache_entry.h,
1075 1, 1, 1075 1, 1,
1076 fmt, tex->pt->dataformat, 1076 fmt, tex->pt->dataformat,
1077 (unsigned char *) im->image.data + (((im->cache_entry.h - 1) * im->cache_entry.w) + (im->cache_entry.w - 1)) * bytes_count); 1077 im->image.data8 + (im->cache_entry.h * im->cache_entry.w - 1) * bytes_count);
1078 //2D packing 1078 //2D packing
1079 // --- 1079 // ---
1080 // xxx 1080 // xxx
@@ -1096,7 +1096,7 @@ evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int
1096 _tex_sub_2d(tex->gc, tex->x + im->cache_entry.w, tex->y - 1, 1096 _tex_sub_2d(tex->gc, tex->x + im->cache_entry.w, tex->y - 1,
1097 1, 1, 1097 1, 1,
1098 fmt, tex->pt->dataformat, 1098 fmt, tex->pt->dataformat,
1099 im->image.data + (im->cache_entry.w - 1) * bytes_count); 1099 im->image.data8 + (im->cache_entry.w - 1) * bytes_count);
1100 if (tex->gc->shared->info.unpack_row_length) 1100 if (tex->gc->shared->info.unpack_row_length)
1101 { 1101 {
1102 glPixelStorei(GL_UNPACK_ROW_LENGTH, im->cache_entry.w); 1102 glPixelStorei(GL_UNPACK_ROW_LENGTH, im->cache_entry.w);
@@ -1113,7 +1113,7 @@ evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int
1113 _tex_sub_2d(tex->gc, tex->x + im->cache_entry.w, tex->y, 1113 _tex_sub_2d(tex->gc, tex->x + im->cache_entry.w, tex->y,
1114 1, im->cache_entry.h, 1114 1, im->cache_entry.h,
1115 fmt, tex->pt->dataformat, 1115 fmt, tex->pt->dataformat,
1116 (unsigned char *) im->image.data + (im->cache_entry.w - 1) * bytes_count); 1116 im->image.data8 + (im->cache_entry.w - 1) * bytes_count);
1117 } 1117 }
1118 else 1118 else
1119 { 1119 {