forked from enlightenment/efl
evas: let's have an O(1) check instead of O(N).
SVN revision: 72266
This commit is contained in:
parent
873d5ed76a
commit
67a8db57b1
|
@ -619,6 +619,7 @@ evas_common_pipe_load(void *data)
|
|||
{
|
||||
evas_common_font_draw_prepare(text_props);
|
||||
text_props->changed = EINA_FALSE;
|
||||
text_props->prepare = EINA_FALSE;
|
||||
}
|
||||
LKU(fi->ft_mutex);
|
||||
}
|
||||
|
@ -738,11 +739,9 @@ evas_common_pipe_image_load(RGBA_Image *im)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_pipe_text_prepare(const Evas_Text_Props *text_props)
|
||||
evas_common_pipe_text_prepare(Evas_Text_Props *text_props)
|
||||
{
|
||||
RGBA_Font_Int *fi;
|
||||
const Evas_Text_Props *tmp_props;
|
||||
const Eina_List *l;
|
||||
|
||||
fi = text_props->font_instance;
|
||||
if (!fi) return ;
|
||||
|
@ -750,9 +749,6 @@ evas_common_pipe_text_prepare(const Evas_Text_Props *text_props)
|
|||
if (!text_props->changed && text_props->generation == fi->generation && text_props->bin)
|
||||
return ;
|
||||
|
||||
fi = text_props->font_instance;
|
||||
if (!fi) return ;
|
||||
|
||||
LKL(fi->ft_mutex);
|
||||
|
||||
if (!fi->task)
|
||||
|
@ -762,10 +758,8 @@ evas_common_pipe_text_prepare(const Evas_Text_Props *text_props)
|
|||
LKU(text_task_mutex);
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(fi->task, l, tmp_props)
|
||||
if (tmp_props == text_props)
|
||||
goto end;
|
||||
|
||||
if (text_props->prepare) goto end;
|
||||
text_props->prepare = EINA_TRUE;
|
||||
fi->task = eina_list_append(fi->task, text_props);
|
||||
|
||||
end:
|
||||
|
|
|
@ -23,7 +23,7 @@ EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc
|
|||
EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
|
||||
EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
|
||||
EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Text_Props *intl_props);
|
||||
EAPI void evas_common_pipe_text_prepare(const Evas_Text_Props *text_props);
|
||||
EAPI void evas_common_pipe_text_prepare(Evas_Text_Props *text_props);
|
||||
EAPI void evas_common_pipe_image_load(RGBA_Image *im);
|
||||
EAPI void evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
EAPI void evas_common_pipe_map_begin(RGBA_Image *root);
|
||||
|
|
|
@ -35,6 +35,7 @@ struct _Evas_Text_Props
|
|||
|
||||
int generation;
|
||||
Eina_Bool changed : 1;
|
||||
Eina_Bool prepare : 1;
|
||||
};
|
||||
|
||||
struct _Evas_Text_Props_Info
|
||||
|
|
Loading…
Reference in New Issue