summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2021-01-20 20:21:08 +0900
committerHermet Park <chuneon.park@samsung.com>2021-01-20 20:21:08 +0900
commit01a090d898f0e0da4ac6437db48ef2c8279fc662 (patch)
tree684830893ad470e14db1183de0cf4ec89b12647c /src/modules
parent50e9b2fa9522976f961c323d82d822e4ceb40aa1 (diff)
parent728d4dba16bd079ded043bc4b61f464bc7ad48b0 (diff)
Merge branch 'master' into devs/hermet/lottie
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h2
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_image.c15
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c7
3 files changed, 19 insertions, 5 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index c7b4d22150..2d9d825a75 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -723,7 +723,7 @@ Evas_GL_Texture *evas_gl_common_texture_render_noscale_new(Evas_Engine_GL_Conte
723Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im); 723Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im);
724void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im); 724void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im);
725void evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int bytes_count); 725void evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int bytes_count);
726void evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force); 726Eina_Bool evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force);
727Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh); 727Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
728void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh); 728void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
729Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); 729Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h);
diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c
index 2d9383305a..c63e22ecc3 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_image.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
@@ -602,6 +602,11 @@ void
602evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint) 602evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
603{ 603{
604 if (im->content_hint == hint) return; 604 if (im->content_hint == hint) return;
605 if ((im->gc) &&
606 ((!im->gc->shared->info.sec_image_map) &&
607 ((!im->gc->shared->info.sec_tbm_surface) ||
608 (!im->gc->shared->info.egl_tbm_ext))))
609 return;
605 im->content_hint = hint; 610 im->content_hint = hint;
606 if (!im->gc) return; 611 if (!im->gc) return;
607 if (!im->gc->shared->info.bgra) return; 612 if (!im->gc->shared->info.bgra) return;
@@ -720,7 +725,15 @@ evas_gl_common_image_free(Evas_GL_Image *im)
720 { 725 {
721 if (_evas_gl_image_cache_add(im)) return; 726 if (_evas_gl_image_cache_add(im)) return;
722 } 727 }
723 if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE); 728 if (im->tex)
729 {
730 if (!evas_gl_common_texture_free(im->tex, EINA_TRUE))
731 {
732 /* if texture is not freed, we need to assign im to NULL
733 because after this point im will be freed */
734 im->tex->im = NULL;
735 }
736 }
724 if (im->im) 737 if (im->im)
725 evas_cache_image_drop(&im->im->cache_entry); 738 evas_cache_image_drop(&im->im->cache_entry);
726 739
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 47dd8305a8..049e4236cb 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -1550,10 +1550,10 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im)
1550 im->cache_entry.flags.textured = 1; 1550 im->cache_entry.flags.textured = 1;
1551} 1551}
1552 1552
1553void 1553Eina_Bool
1554evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force) 1554evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force)
1555{ 1555{
1556 if (!tex) return; 1556 if (!tex) return EINA_FALSE;
1557 if (force) 1557 if (force)
1558 { 1558 {
1559 evas_gl_preload_pop(tex); 1559 evas_gl_preload_pop(tex);
@@ -1562,7 +1562,7 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force)
1562 evas_gl_preload_target_unregister(tex, eina_list_data_get(tex->targets)); 1562 evas_gl_preload_target_unregister(tex, eina_list_data_get(tex->targets));
1563 } 1563 }
1564 tex->references--; 1564 tex->references--;
1565 if (tex->references != 0) return; 1565 if (tex->references != 0) return EINA_FALSE;
1566 if (tex->fglyph) 1566 if (tex->fglyph)
1567 { 1567 {
1568 tex->gc->font_glyph_textures_size -= tex->w * tex->h * 4; 1568 tex->gc->font_glyph_textures_size -= tex->w * tex->h * 4;
@@ -1617,6 +1617,7 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force)
1617 } 1617 }
1618 1618
1619 evas_gl_common_texture_light_free(tex); 1619 evas_gl_common_texture_light_free(tex);
1620 return EINA_TRUE;
1620} 1621}
1621 1622
1622Evas_GL_Texture * 1623Evas_GL_Texture *