From: Joogab Yun Date: Thu, 29 Sep 2016 04:29:28 +0000 (+0900) Subject: [evas_gl] prevent a texture from become null when using dynamic hint X-Git-Tag: accepted/tizen/3.0/ivi/20161011.043919~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1883f97e601c8e73a79fa7c2b61a9ca471e0c7be;p=platform%2Fupstream%2Fefl.git [evas_gl] prevent a texture from become null when using dynamic hint set. and add debug log Change-Id: Iea04129650c14a853b487bdebfe804c788311d66 --- diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c old mode 100755 new mode 100644 index 0e62270..e3499ed --- a/src/modules/evas/engines/gl_common/evas_gl_image.c +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c @@ -622,6 +622,8 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint) { if ((!im->gc->shared->info.sec_image_map) && ((!im->gc->shared->info.sec_tbm_surface) || (!im->gc->shared->info.egl_tbm_ext))) return; + Evas_GL_Texture *tex = evas_gl_common_texture_dynamic_new(im->gc, im); + if (!tex) return; if (im->cs.data) { if (!im->cs.no_free) free(im->cs.data); @@ -650,7 +652,7 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint) evas_gl_common_texture_free(im->tex, EINA_TRUE); im->tex = NULL; } - im->tex = evas_gl_common_texture_dynamic_new(im->gc, im); + im->tex = tex; im->tex_only = 1; } else diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c old mode 100755 new mode 100644 index 3746ba9..83813c8 --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c @@ -811,6 +811,7 @@ _pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, i pt->dyn.buffer, NULL); if (!pt->dyn.img) { + ERR("eglCreateImage() failed"); secsym_tbm_surface_destroy(pt->dyn.buffer); goto error; }