forked from enlightenment/efl
evas font draw - fix possible custout rect leak found by coverity
fixes CID 1039477
This commit is contained in:
parent
2a580c1665
commit
6038318851
|
@ -36,7 +36,7 @@ EAPI FT_UInt evas_common_get_char_index (RGBA_Font_Int* fi,
|
||||||
EAPI void evas_common_font_draw_init (void);
|
EAPI void evas_common_font_draw_init (void);
|
||||||
EAPI void evas_common_font_draw_prepare (Evas_Text_Props *text_props);
|
EAPI void evas_common_font_draw_prepare (Evas_Text_Props *text_props);
|
||||||
EAPI void evas_common_font_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Gfx_Func func, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, const Evas_Text_Props *text_props);
|
EAPI void evas_common_font_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Gfx_Func func, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, const Evas_Text_Props *text_props);
|
||||||
EAPI Eina_Bool evas_common_font_draw_prepare_cutout(Cutout_Rects *reuse, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Gfx_Func *func);
|
EAPI Eina_Bool evas_common_font_draw_prepare_cutout(Cutout_Rects **reuse, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Gfx_Func *func);
|
||||||
|
|
||||||
/* load */
|
/* load */
|
||||||
EAPI void evas_common_font_dpi_set (int dpi);
|
EAPI void evas_common_font_dpi_set (int dpi);
|
||||||
|
|
|
@ -359,7 +359,7 @@ evas_common_font_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip,
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_common_font_draw_prepare_cutout(Cutout_Rects *reuse, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Gfx_Func *func)
|
evas_common_font_draw_prepare_cutout(Cutout_Rects **reuse, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Gfx_Func *func)
|
||||||
{
|
{
|
||||||
int im_w, im_h;
|
int im_w, im_h;
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ evas_common_font_draw_prepare_cutout(Cutout_Rects *reuse, RGBA_Image *dst, RGBA_
|
||||||
|
|
||||||
if (dc->cutout.rects)
|
if (dc->cutout.rects)
|
||||||
{
|
{
|
||||||
reuse = evas_common_draw_context_apply_cutouts(dc, reuse);
|
*reuse = evas_common_draw_context_apply_cutouts(dc, *reuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
|
@ -442,7 +442,7 @@ evas_common_pipe_text_draw_prepare(void *data, RGBA_Image *dst, RGBA_Pipe_Op *op
|
||||||
Eina_Bool r;
|
Eina_Bool r;
|
||||||
|
|
||||||
recycle = evas_pipe_cutout_rects_pop(info);
|
recycle = evas_pipe_cutout_rects_pop(info);
|
||||||
r = evas_common_font_draw_prepare_cutout(recycle, dst, &(op->context),
|
r = evas_common_font_draw_prepare_cutout(&recycle, dst, &(op->context),
|
||||||
&(op->op.text.func));
|
&(op->op.text.func));
|
||||||
if (recycle->active) op->rects = recycle;
|
if (recycle->active) op->rects = recycle;
|
||||||
else evas_pipe_cutout_rects_push(info, recycle);
|
else evas_pipe_cutout_rects_push(info, recycle);
|
||||||
|
|
Loading…
Reference in New Issue