void *(*gl_new) (void *data, RGBA_Font_Glyph *fg),
void (*gl_free) (void *ext_dat),
void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y),
+ /* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process
void *(*gl_image_new_from_data) (void *gc, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace),
+ */
+ void *(*gl_image_new_from_data) (void *gc, RGBA_Font_Glyph *fg, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace),
+ /* END */
void (*gl_image_free) (void *image),
void (*gl_image_draw) (void *gc, void *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth));
EAPI void evas_common_draw_context_clip_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h);
void *(*gl_new) (void *data, RGBA_Font_Glyph *fg),
void (*gl_free) (void *ext_dat),
void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y),
+ /* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process
void *(*gl_image_new_from_data) (void *gc, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace),
+ */
+ void *(*gl_image_new_from_data) (void *gc, RGBA_Font_Glyph *fg, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace),
+ /* END */
void (*gl_image_free) (void *image),
void (*gl_image_draw) (void *gc, void *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth))
{
if (dc->font_ext.func.gl_image_new_from_data)
{
/* extension calls */
+ /* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process
fg->ext_dat = dc->font_ext.func.gl_image_new_from_data
(dc->font_ext.data, (unsigned int)w, (unsigned int)h,
(DATA32 *)fg->glyph_out->bitmap.buffer, EINA_TRUE,
EVAS_COLORSPACE_ARGB8888);
+ */
+ fg->ext_dat = dc->font_ext.func.gl_image_new_from_data
+ (dc->font_ext.data, fg, (unsigned int)w, (unsigned int)h,
+ (DATA32 *)fg->glyph_out->bitmap.buffer, EINA_TRUE,
+ EVAS_COLORSPACE_ARGB8888);
+ /* END */
fg->ext_dat_free = dc->font_ext.func.gl_image_free;
}
else
void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
void (*gl_free) (void *ext_dat);
void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
+ /* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process
void *(*gl_image_new_from_data) (void *gc, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
+ */
+ void *(*gl_image_new_from_data) (void *gc, RGBA_Font_Glyph *fg, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
+ /* END */
void (*gl_image_free) (void *image);
void (*gl_image_draw) (void *gc, void *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
} func;
} pipe[MAX_PIPES];
Eina_List *font_glyph_textures;
+ /* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process */
+ Eina_List *font_glyph_images;
+ /* END */
Eina_Bool havestuff : 1;
RGBA_Image *im;
Evas_GL_Texture *tex;
Evas_Image_Load_Opts load_opts;
+ /* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process */
+ RGBA_Font_Glyph *fglyph;
+ /* END */
int references;
// if im->im == NULL, it's a render-surface so these here are used
int w, h;
void *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg);
void evas_gl_font_texture_free(void *);
void evas_gl_font_texture_draw(void *gc, void *surface, void *dc, RGBA_Font_Glyph *fg, int x, int y);
+/* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process
void *evas_gl_image_new_from_data(void *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace cspace);
+ */
+void *evas_gl_image_new_from_data(void *gc, RGBA_Font_Glyph *fg, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace cspace);
+/* END */
void evas_gl_image_free(void *im);
void evas_gl_image_draw(void *gc, void *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
while (gc->font_glyph_textures)
evas_gl_common_texture_free(gc->font_glyph_textures->data, EINA_TRUE);
+ /* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process */
+ while (gc->font_glyph_images)
+ evas_gl_common_image_free(gc->font_glyph_images->data);
+ /* END */
+
if ((gc->shared) && (gc->shared->references == 0))
{
Evas_GL_Texture_Pool *pt;
{
im->references--;
if (im->references > 0) return;
+ /* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process */
+ if (im->fglyph)
+ {
+ im->gc->font_glyph_images = eina_list_remove(im->gc->font_glyph_images, im);
+ im->fglyph->ext_dat = NULL;
+ im->fglyph->ext_dat_free = NULL;
+ }
+ /* END */
evas_gl_common_context_flush(im->gc);
if (im->scaled.origin)
gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch;
}
+/* TIZEN_ONLY(20170226): clean up GL images for emojis when GL context is free'd in shutdown process
void *
evas_gl_image_new_from_data(void *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace cspace)
{
alpha,
cspace);
}
+ */
+void *
+evas_gl_image_new_from_data(void *gc, RGBA_Font_Glyph *fg, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace cspace)
+{
+ Evas_Engine_GL_Context *context = (Evas_Engine_GL_Context *)gc;
+ Evas_GL_Image *im = evas_gl_common_image_new_from_data(context,
+ w, h,
+ data,
+ alpha,
+ cspace);
+
+ if (im)
+ {
+ im->fglyph = fg;
+ context->font_glyph_images = eina_list_append(context->font_glyph_images, im);
+ }
+
+ return (void *)im;
+}
+/* END */
void
evas_gl_image_free(void *im)