forked from enlightenment/efl
Evas font-engine: Remove passing of strings to font_draw.
This is not needed anymore because we have working string objects. SVN revision: 59133
This commit is contained in:
parent
dad49dd1f2
commit
e93f10b8aa
|
@ -1666,7 +1666,7 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
|
|||
obj->cur.geometry.h, \
|
||||
obj->cur.geometry.w, \
|
||||
obj->cur.geometry.h, \
|
||||
it->text, &it->text_props);
|
||||
&it->text_props);
|
||||
|
||||
/* shadows */
|
||||
shad_dst = shad_sz = dx = dy = haveshad = 0;
|
||||
|
|
|
@ -8059,7 +8059,6 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
|
|||
obj->cur.geometry.x + ln->par->x + ln->x + ti->parent.x + x + (ox), \
|
||||
obj->cur.geometry.y + ln->par->y + ln->y + yoff + y + (oy), \
|
||||
ti->parent.w, ti->parent.h, ti->parent.w, ti->parent.h, \
|
||||
GET_ITEM_TEXT(ti), \
|
||||
&ti->text_props);
|
||||
#define ITEM_WALK_LINE_SKIP_DROP() \
|
||||
if ((ln->par->y + ln->y + ln->h) <= 0) continue; \
|
||||
|
|
|
@ -17,7 +17,7 @@ EAPI int evas_common_font_get_line_advance (RGBA_Font *fn);
|
|||
|
||||
/* draw */
|
||||
|
||||
EAPI void evas_common_font_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Eina_Unicode *text, const Evas_Text_Props *intl_props);
|
||||
EAPI void evas_common_font_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props);
|
||||
EAPI int evas_common_font_glyph_search (RGBA_Font *fn, RGBA_Font_Int **fi_ret, int gl);
|
||||
EAPI RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index);
|
||||
EAPI void evas_common_font_draw_init (void);
|
||||
|
|
|
@ -516,9 +516,6 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
|
|||
# endif
|
||||
}
|
||||
}
|
||||
#else
|
||||
(void) text;
|
||||
(void) fn;
|
||||
#endif
|
||||
|
||||
im = dst->image.data;
|
||||
|
@ -686,8 +683,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Eina_Unicode *text __UNUSED__,
|
||||
const Evas_Text_Props *text_props)
|
||||
evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *text_props)
|
||||
{
|
||||
int ext_x, ext_y, ext_w, ext_h;
|
||||
int im_w, im_h;
|
||||
|
|
|
@ -1183,7 +1183,6 @@ evas_common_pipe_op_text_free(RGBA_Pipe_Op *op)
|
|||
evas_common_font_free(op->op.text.font);
|
||||
#endif
|
||||
evas_common_text_props_content_unref(&(op->op.text.intl_props));
|
||||
free(op->op.text.text);
|
||||
evas_common_pipe_op_free(op);
|
||||
}
|
||||
|
||||
|
@ -1221,28 +1220,27 @@ evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
|
|||
#endif
|
||||
evas_common_font_draw(dst, &(context),
|
||||
op->op.text.font, op->op.text.x, op->op.text.y,
|
||||
op->op.text.text, &op->op.text.intl_props);
|
||||
&op->op.text.intl_props);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_common_font_draw(dst, &(op->context),
|
||||
op->op.text.font, op->op.text.x, op->op.text.y,
|
||||
op->op.text.text, &op->op.text.intl_props);
|
||||
&op->op.text.intl_props);
|
||||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
|
||||
RGBA_Font *fn, int x, int y, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
|
||||
RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props)
|
||||
{
|
||||
RGBA_Pipe_Op *op;
|
||||
|
||||
if ((!fn) || (!text)) return;
|
||||
if (!fn) return;
|
||||
dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
|
||||
if (!dst->cache_entry.pipe) return;
|
||||
op->op.text.x = x;
|
||||
op->op.text.y = y;
|
||||
op->op.text.text = eina_unicode_strdup(text);
|
||||
evas_common_text_props_content_copy_and_ref(&(op->op.text.intl_props),
|
||||
intl_props);
|
||||
#ifdef EVAS_FRAME_QUEUING
|
||||
|
|
|
@ -92,7 +92,7 @@ EAPI void evas_common_pipe_free(RGBA_Image *im);
|
|||
EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
|
||||
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, RGBA_Font *fn, int x, int y, const Eina_Unicode *text, const Evas_Text_Props *intl_props);
|
||||
EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_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);
|
||||
|
|
|
@ -693,7 +693,6 @@ struct _RGBA_Pipe_Op
|
|||
struct {
|
||||
RGBA_Font *font;
|
||||
int x, y;
|
||||
Eina_Unicode *text;
|
||||
Evas_Text_Props intl_props;
|
||||
} text;
|
||||
struct {
|
||||
|
|
|
@ -691,7 +691,7 @@ struct _Evas_Func
|
|||
int (*font_v_advance_get) (void *data, void *font, const Evas_Text_Props *intl_props);
|
||||
int (*font_char_coords_get) (void *data, void *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
|
||||
int (*font_char_at_coords_get) (void *data, void *font, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
|
||||
void (*font_draw) (void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const Eina_Unicode *text, const Evas_Text_Props *intl_props);
|
||||
void (*font_draw) (void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const Evas_Text_Props *intl_props);
|
||||
|
||||
void (*font_cache_flush) (void *data);
|
||||
void (*font_cache_set) (void *data, int bytes);
|
||||
|
|
|
@ -388,7 +388,7 @@ eng_image_scale_hint_get(void *data __UNUSED__, void *image)
|
|||
}
|
||||
|
||||
static void
|
||||
eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
|
||||
eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const Evas_Text_Props *intl_props)
|
||||
{
|
||||
Render_Engine *re = (Render_Engine *)data;
|
||||
RGBA_Image im;
|
||||
|
@ -402,7 +402,7 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
|
|||
evas_direct3d_font_texture_new,
|
||||
evas_direct3d_font_texture_free,
|
||||
evas_direct3d_font_texture_draw);
|
||||
evas_common_font_draw(&im, context, font, x, y, text, intl_props);
|
||||
evas_common_font_draw(&im, context, font, x, y, intl_props);
|
||||
evas_common_draw_context_font_ext_set(context, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1037,7 +1037,7 @@ evas_engine_dfb_output_idle_flush(void *data)
|
|||
* memory.
|
||||
*/
|
||||
static void
|
||||
evas_engine_dfb_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
|
||||
evas_engine_dfb_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props)
|
||||
{
|
||||
DirectFB_Engine_Image_Entry *eim = surface;
|
||||
IDirectFBSurface *screen;
|
||||
|
@ -1049,7 +1049,7 @@ evas_engine_dfb_font_draw(void *data, void *context, void *surface, void *font,
|
|||
if (!_dfb_lock_and_sync_image(screen, im, DSLF_READ | DSLF_WRITE))
|
||||
return;
|
||||
|
||||
evas_common_font_draw(im, context, font, x, y, text, intl_props);
|
||||
evas_common_font_draw(im, context, font, x, y, intl_props);
|
||||
evas_common_cpu_end_opt();
|
||||
|
||||
im->image.data = NULL;
|
||||
|
|
|
@ -817,7 +817,7 @@ eng_image_scale_hint_get(void *data __UNUSED__, void *image)
|
|||
}
|
||||
|
||||
static void
|
||||
eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
|
||||
eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props)
|
||||
{
|
||||
Render_Engine *re;
|
||||
|
||||
|
@ -837,7 +837,7 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
|
|||
evas_gl_font_texture_new,
|
||||
evas_gl_font_texture_free,
|
||||
evas_gl_font_texture_draw);
|
||||
evas_common_font_draw(im, context, font, x, y, text, intl_props);
|
||||
evas_common_font_draw(im, context, font, x, y, intl_props);
|
||||
evas_common_draw_context_font_ext_set(context,
|
||||
NULL,
|
||||
NULL,
|
||||
|
|
|
@ -2043,7 +2043,7 @@ eng_image_stride_get(void *data __UNUSED__, void *image, int *stride)
|
|||
}
|
||||
|
||||
static void
|
||||
eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
|
||||
eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props)
|
||||
{
|
||||
Render_Engine *re;
|
||||
|
||||
|
@ -2064,7 +2064,7 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
|
|||
evas_gl_font_texture_new,
|
||||
evas_gl_font_texture_free,
|
||||
evas_gl_font_texture_draw);
|
||||
evas_common_font_draw(im, context, font, x, y, text, intl_props);
|
||||
evas_common_font_draw(im, context, font, x, y, intl_props);
|
||||
evas_common_draw_context_font_ext_set(context,
|
||||
NULL,
|
||||
NULL,
|
||||
|
|
|
@ -289,7 +289,7 @@ eng_image_cache_get(void *data __UNUSED__)
|
|||
}
|
||||
|
||||
static void
|
||||
eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *text_props)
|
||||
eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *text_props)
|
||||
{
|
||||
static RGBA_Image *im = NULL;
|
||||
Soft16_Image *dst = surface;
|
||||
|
@ -302,7 +302,7 @@ eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, i
|
|||
evas_common_soft16_font_glyph_new,
|
||||
evas_common_soft16_font_glyph_free,
|
||||
evas_common_soft16_font_glyph_draw);
|
||||
evas_common_font_draw(im, context, font, x, y, text, text_props);
|
||||
evas_common_font_draw(im, context, font, x, y, text_props);
|
||||
evas_common_draw_context_font_ext_set(context,
|
||||
NULL,
|
||||
NULL,
|
||||
|
|
|
@ -338,9 +338,9 @@ eng_image_cache_get(void *data __UNUSED__)
|
|||
|
||||
static void
|
||||
eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font,
|
||||
int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *text_props)
|
||||
int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *text_props)
|
||||
{
|
||||
evas_common_font_draw(surface, context, font, x, y, text, text_props);
|
||||
evas_common_font_draw(surface, context, font, x, y, text_props);
|
||||
evas_common_draw_context_font_ext_set(context, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -797,7 +797,7 @@ eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Evas_Text_Props
|
|||
}
|
||||
|
||||
static void
|
||||
eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *text_props)
|
||||
eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *text_props)
|
||||
{
|
||||
#ifdef BUILD_PIPE_RENDER
|
||||
if ((cpunum > 1)
|
||||
|
@ -805,11 +805,11 @@ eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, i
|
|||
&& evas_common_frameq_enabled()
|
||||
#endif
|
||||
)
|
||||
evas_common_pipe_text_draw(surface, context, font, x, y, text, text_props);
|
||||
evas_common_pipe_text_draw(surface, context, font, x, y, text_props);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
evas_common_font_draw(surface, context, font, x, y, text, text_props);
|
||||
evas_common_font_draw(surface, context, font, x, y, text_props);
|
||||
evas_common_cpu_end_opt();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -750,7 +750,7 @@ evas_engine_sdl_font_draw(void *data __UNUSED__, void *context, void *surface, v
|
|||
_SDL_UPDATE_PIXELS(eim);
|
||||
}
|
||||
|
||||
evas_common_font_draw((RGBA_Image *) eim->cache_entry.src, context, font, x, y, text, intl_props);
|
||||
evas_common_font_draw((RGBA_Image *) eim->cache_entry.src, context, font, x, y, intl_props);
|
||||
evas_common_cpu_end_opt();
|
||||
|
||||
if (mustlock_im)
|
||||
|
|
Loading…
Reference in New Issue