summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_texture.c
diff options
context:
space:
mode:
authorOleksandr Shcherbina <o.shcherbina@samsung.com>2015-04-22 15:15:08 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-07 09:53:09 +0200
commit0f6d101ad5ec8327088e448c347e1f4054a5c8d7 (patch)
tree8901b52a716b30e4107ed2e6ea7c2e5fe2676062 /src/modules/evas/engines/gl_common/evas_gl_texture.c
parent83bb3b5b5180bbe96d6ea8da1f3b82071b6a01c9 (diff)
evas: add to Evas_GL_Image flag disable generate atlas.
Summary: It is need in case Evas_3D_Mesh created with not normileze texture coordinate and flag repeat mode for Evas_3D_Texture Additional info see here https://phab.enlightenment.org/conpherence/54/ Use Evas_GL_Image for generation texture unit for Evas_3D_Texture see here https://phab.enlightenment.org/D2371 Reviewers: jpeg, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2375 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c17
1 files changed, 11 insertions, 6 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 f65784d9b3..5c1c07f247 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -439,13 +439,18 @@ _pool_tex_alloc(Evas_GL_Texture_Pool *pt, int w, int h, int *u, int *v)
439static Evas_GL_Texture_Pool * 439static Evas_GL_Texture_Pool *
440_pool_tex_find(Evas_Engine_GL_Context *gc, int w, int h, 440_pool_tex_find(Evas_Engine_GL_Context *gc, int w, int h,
441 GLenum intformat, GLenum format, int *u, int *v, 441 GLenum intformat, GLenum format, int *u, int *v,
442 Eina_Rectangle **apt, int atlas_w) 442 Eina_Rectangle **apt, int atlas_w, Eina_Bool disable_atlas)
443{ 443{
444 Evas_GL_Texture_Pool *pt = NULL; 444 Evas_GL_Texture_Pool *pt = NULL;
445 Eina_List *l; 445 Eina_List *l;
446 int th2; 446 int th2;
447 int pool_h; 447 int pool_h;
448 448 /*Return texture unit without atlas*/
449 if (disable_atlas)
450 {
451 pt = _pool_tex_new(gc, w, h, intformat, format);
452 return pt ? pt : NULL;
453 }
449 if (atlas_w > gc->shared->info.max_texture_size) 454 if (atlas_w > gc->shared->info.max_texture_size)
450 atlas_w = gc->shared->info.max_texture_size; 455 atlas_w = gc->shared->info.max_texture_size;
451 if ((w > gc->shared->info.tune.atlas.max_w) || 456 if ((w > gc->shared->info.tune.atlas.max_w) ||
@@ -490,7 +495,7 @@ _pool_tex_find(Evas_Engine_GL_Context *gc, int w, int h,
490} 495}
491 496
492Evas_GL_Texture * 497Evas_GL_Texture *
493evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im) 498evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im, Eina_Bool disable_atlas)
494{ 499{
495 Evas_GL_Texture *tex; 500 Evas_GL_Texture *tex;
496 GLsizei w, h; 501 GLsizei w, h;
@@ -535,7 +540,7 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
535 *matching_format[lformat].intformat, 540 *matching_format[lformat].intformat,
536 *matching_format[lformat].format, 541 *matching_format[lformat].format,
537 &u, &v, &tex->apt, 542 &u, &v, &tex->apt,
538 gc->shared->info.tune.atlas.max_alloc_size); 543 gc->shared->info.tune.atlas.max_alloc_size, disable_atlas);
539 if (!tex->pt) 544 if (!tex->pt)
540 { 545 {
541 evas_gl_common_texture_light_free(tex); 546 evas_gl_common_texture_light_free(tex);
@@ -1350,7 +1355,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im)
1350 *matching_format[lformat].intformat, 1355 *matching_format[lformat].intformat,
1351 *matching_format[lformat].format, 1356 *matching_format[lformat].format,
1352 &u, &v, &tex->aptt, 1357 &u, &v, &tex->aptt,
1353 tex->gc->shared->info.tune.atlas.max_alloc_size); 1358 tex->gc->shared->info.tune.atlas.max_alloc_size, EINA_FALSE);
1354 if (!tex->ptt) 1359 if (!tex->ptt)
1355 goto upload; 1360 goto upload;
1356 1361
@@ -1470,7 +1475,7 @@ evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels,
1470 1475
1471 tex->pt = _pool_tex_find(gc, w + 3, fh, alpha_ifmt, alpha_fmt, &u, &v, 1476 tex->pt = _pool_tex_find(gc, w + 3, fh, alpha_ifmt, alpha_fmt, &u, &v,
1472 &tex->apt, 1477 &tex->apt,
1473 gc->shared->info.tune.atlas.max_alloc_alpha_size); 1478 gc->shared->info.tune.atlas.max_alloc_alpha_size, EINA_FALSE);
1474 if (!tex->pt) 1479 if (!tex->pt)
1475 { 1480 {
1476 evas_gl_common_texture_light_free(tex); 1481 evas_gl_common_texture_light_free(tex);