Evas font-engine: Remove passing of strings to font_draw.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 May 2011 15:33:46 +0000 (15:33 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 May 2011 15:33:46 +0000 (15:33 +0000)
This is not needed anymore because we have working string objects.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@59133 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

16 files changed:
src/lib/canvas/evas_object_text.c
src/lib/canvas/evas_object_textblock.c
src/lib/engines/common/evas_font.h
src/lib/engines/common/evas_font_draw.c
src/lib/engines/common/evas_pipe.c
src/lib/engines/common/evas_pipe.h
src/lib/include/evas_common.h
src/lib/include/evas_private.h
src/modules/engines/direct3d/evas_engine.c
src/modules/engines/directfb/evas_engine.c
src/modules/engines/gl_sdl/evas_engine.c
src/modules/engines/gl_x11/evas_engine.c
src/modules/engines/software_16/evas_engine.c
src/modules/engines/software_8/evas_engine.c
src/modules/engines/software_generic/evas_engine.c
src/modules/engines/software_sdl/evas_engine.c

index 15e410e..fe5c790 100644 (file)
@@ -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;
index 4be3fee..b38c9cd 100644 (file)
@@ -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; \
index f174dbf..7f18075 100644 (file)
@@ -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);
index 668f838..f6c07ef 100644 (file)
@@ -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;
index b18ab0d..9db8a5f 100644 (file)
@@ -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
index df7f673..f3b504d 100644 (file)
@@ -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);
index 1e7b610..2f5cd62 100644 (file)
@@ -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 {
index db04d4e..83b5242 100644 (file)
@@ -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);
index 2ed59bc..35b98fa 100644 (file)
@@ -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);
 }
 
index 4f960cd..12e080a 100644 (file)
@@ -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;
index fd4f817..27a49f3 100644 (file)
@@ -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,
index 443d587..55d457b 100644 (file)
@@ -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,
index 078139e..90913b8 100644 (file)
@@ -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,
index 833cf7c..6580d87 100644 (file)
@@ -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);
 }
 
index d62b966..4aac8d6 100644 (file)
@@ -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();
      }
 }
index 7c6f2b5..6ac9744 100644 (file)
@@ -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)