forked from enlightenment/efl
evas: detect properly when we wippe out font information.
SVN revision: 70923
This commit is contained in:
parent
f14d6ca3e1
commit
4494035fa7
|
@ -22,7 +22,7 @@ EAPI int evas_common_font_glyph_search (RGBA_Font *fn, RGB
|
|||
EAPI RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index);
|
||||
EAPI FT_UInt evas_common_get_char_index (RGBA_Font_Int* fi, Eina_Unicode gl);
|
||||
EAPI void evas_common_font_draw_init (void);
|
||||
EAPI void evas_common_font_draw_prepare (const Evas_Text_Props *text_props);
|
||||
EAPI void evas_common_font_draw_prepare (Evas_Text_Props *text_props);
|
||||
|
||||
/* load */
|
||||
EAPI void evas_common_font_dpi_set (int dpi);
|
||||
|
|
|
@ -263,7 +263,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, in
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_font_draw_prepare(const Evas_Text_Props *text_props)
|
||||
evas_common_font_draw_prepare(Evas_Text_Props *text_props)
|
||||
{
|
||||
RGBA_Font_Int *fi;
|
||||
EVAS_FONT_WALK_TEXT_INIT();
|
||||
|
@ -293,6 +293,8 @@ evas_common_font_draw_prepare(const Evas_Text_Props *text_props)
|
|||
fg = evas_common_font_int_cache_glyph_get(fi, idx);
|
||||
}
|
||||
EVAS_FONT_WALK_TEXT_END();
|
||||
|
||||
text_props->generation = fi->generation;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -743,6 +743,7 @@ _evas_common_font_int_clear(RGBA_Font_Int *fi)
|
|||
}
|
||||
if (fi->inuse) fonts_use_usage -= fi->usage;
|
||||
fi->usage = 0;
|
||||
fi->generation++;
|
||||
LKU(fi->ft_mutex);
|
||||
}
|
||||
|
||||
|
|
|
@ -805,7 +805,11 @@ evas_common_pipe_text_prepare(const Evas_Text_Props *text_props)
|
|||
const Evas_Text_Props *tmp_props;
|
||||
const Eina_List *l;
|
||||
|
||||
if (!text_props->changed) return ;
|
||||
fi = text_props->font_instance;
|
||||
if (!fi) return ;
|
||||
|
||||
if (!text_props->changed && text_props->generation == fi->generation)
|
||||
return ;
|
||||
|
||||
fi = text_props->font_instance;
|
||||
if (!fi) return ;
|
||||
|
|
|
@ -25,6 +25,7 @@ struct _Evas_Text_Props
|
|||
Evas_Text_Props_Info *info;
|
||||
void *font_instance;
|
||||
|
||||
int generation;
|
||||
Eina_Bool changed : 1;
|
||||
};
|
||||
|
||||
|
|
|
@ -941,6 +941,9 @@ struct _RGBA_Font_Int
|
|||
in order to comply with the wanted_rend. */
|
||||
|
||||
Eina_List *task;
|
||||
|
||||
int generation;
|
||||
|
||||
unsigned char sizeok : 1;
|
||||
unsigned char inuse : 1;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue