diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h index 0a1062db7c..d695cb8fb7 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h @@ -159,6 +159,8 @@ struct _Evas_GL_Texture_Pool int slot, fslot; Eina_List *allocations; Eina_Bool whole : 1; + Eina_Bool render : 1; + Eina_Bool native : 1; }; struct _Evas_GL_Texture diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c index e8df55f698..f3091b58b1 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c @@ -584,7 +584,7 @@ evas_gl_common_context_image_push(Evas_GL_Context *gc, ty2 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; } if (blend) bl = 0.0; - + PUSH_VERTEX(x , y , 0); PUSH_VERTEX(x + w, y , 0); PUSH_VERTEX(x , y + h, 0); diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_image.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_image.c index f723b92d16..e21fb85e5d 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_image.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_image.c @@ -408,9 +408,7 @@ evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy yuv = 1; im->tex->im = im; - if ((!gc->dc->cutout.rects) -// || (gc->dc->cutout.active > 32) - ) + if ((!gc->dc->cutout.rects) || (gc->dc->cutout.active > 8)) { if (gc->dc->clip.use) { diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c index eced3b8a6f..7823b1caee 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c @@ -271,6 +271,7 @@ _pool_tex_render_new(Evas_GL_Context *gc, int w, int h, int intformat, int forma pt->intformat = intformat; pt->format = format; pt->dataformat = GL_UNSIGNED_BYTE; + pt->render = 1; pt->references = 0; #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) # ifndef GL_FRAMEBUFFER @@ -311,8 +312,6 @@ _pool_tex_native_new(Evas_GL_Context *gc, int w, int h, int intformat, int forma pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); if (!pt) return NULL; - h = _tex_round_slot(gc, h) << 4; -// _tex_adjust(gc, &w, &h); pt->gc = gc; pt->w = w; pt->h = h; @@ -320,6 +319,7 @@ _pool_tex_native_new(Evas_GL_Context *gc, int w, int h, int intformat, int forma pt->format = format; pt->dataformat = GL_UNSIGNED_BYTE; pt->references = 0; + pt->native = 1; glGenTextures(1, &(pt->texture)); glBindTexture(GL_TEXTURE_2D, pt->texture); @@ -342,11 +342,14 @@ pt_unref(Evas_GL_Texture_Pool *pt) { pt->references--; if (pt->references > 0) return; - if (pt->whole) - pt->gc->shared->tex.whole = eina_list_remove(pt->gc->shared->tex.whole, pt); - else - pt->gc->shared->tex.atlas [pt->slot][pt->fslot] = - eina_list_remove(pt->gc->shared->tex.atlas[pt->slot][pt->fslot], pt); + if (!((pt->render) || (pt->native))) + { + if (pt->whole) + pt->gc->shared->tex.whole = eina_list_remove(pt->gc->shared->tex.whole, pt); + else + pt->gc->shared->tex.atlas [pt->slot][pt->fslot] = + eina_list_remove(pt->gc->shared->tex.atlas[pt->slot][pt->fslot], pt); + } glDeleteTextures(1, &(pt->texture)); if (pt->fb) glsym_glDeleteFramebuffers(1, &(pt->fb)); free(pt);