[Rollback]
[framework/uifw/evas.git] / src / modules / engines / software_generic / evas_engine.c
index a28185e..f2bd395 100644 (file)
@@ -1,4 +1,4 @@
-#include "evas_common.h"
+#include "evas_common.h" /* Also includes international specific stuff */
 #include "evas_private.h"
 
 /*
@@ -97,6 +97,24 @@ eng_context_multiplier_get(void *data __UNUSED__, void *context, int *r, int *g,
 }
 
 static void
+eng_context_mask_set(void *data __UNUSED__, void *context, void *mask, int x, int y, int w, int h)
+{
+   evas_common_draw_context_set_mask(context, mask, x, y, w, h);
+}
+
+static void
+eng_context_mask_unset(void *data __UNUSED__, void *context)
+{
+   evas_common_draw_context_unset_mask(context);
+}
+
+static void *
+eng_context_mask_get(void *data __UNUSED__, void *context)
+{
+   return ((RGBA_Draw_Context *)context)->mask.mask;
+}
+
+static void
 eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y, int w, int h)
 {
    evas_common_draw_context_add_cutout(context, x, y, w, h);
@@ -212,312 +230,6 @@ eng_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *poly
      }
 }
 
-static void
-eng_gradient2_color_np_stop_insert(void *data __UNUSED__, void *gradient, int r, int g, int b, int a, float pos)
-{
-   evas_common_gradient2_color_np_stop_insert(gradient, r, g, b, a, pos);
-}
-
-static void
-eng_gradient2_clear(void *data __UNUSED__, void *gradient)
-{
-   evas_common_gradient2_clear(gradient);
-}
-
-static void
-eng_gradient2_fill_transform_set(void *data __UNUSED__, void *gradient, void *transform)
-{
-   evas_common_gradient2_fill_transform_set(gradient, transform);
-}
-
-static void
-eng_gradient2_fill_spread_set(void *data __UNUSED__, void *gradient, int spread)
-{
-   evas_common_gradient2_fill_spread_set(gradient, spread);
-}
-
-static void *
-eng_gradient2_linear_new(void *data __UNUSED__)
-{
-   return evas_common_gradient2_linear_new();
-}
-
-static void
-eng_gradient2_linear_free(void *data __UNUSED__, void *linear_gradient)
-{
-   evas_common_gradient2_free(linear_gradient);
-}
-
-static void
-eng_gradient2_linear_fill_set(void *data __UNUSED__, void *linear_gradient, float x0, float y0, float x1, float y1)
-{
-   evas_common_gradient2_linear_fill_set(linear_gradient, x0, y0, x1, y1);
-}
-
-static int
-eng_gradient2_linear_is_opaque(void *data __UNUSED__, void *context, void *linear_gradient, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
-{
-   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
-   RGBA_Gradient2 *gr = (RGBA_Gradient2 *)linear_gradient;
-
-   if (!dc || !gr || !gr->type.geometer)  return 0;
-   return !(gr->type.geometer->has_alpha(gr, dc->render_op) |
-              gr->type.geometer->has_mask(gr, dc->render_op));
-}
-
-static int
-eng_gradient2_linear_is_visible(void *data __UNUSED__, void *context, void *linear_gradient, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
-{
-   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
-
-   if (!dc || !linear_gradient)  return 0;
-   return 1;
-}
-
-static void
-eng_gradient2_linear_render_pre(void *data __UNUSED__, void *context, void *linear_gradient)
-{
-   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
-   RGBA_Gradient2 *gr = (RGBA_Gradient2 *)linear_gradient;
-   int  len;
-
-   if (!dc || !gr || !gr->type.geometer)  return;
-   gr->type.geometer->geom_update(gr);
-   len = gr->type.geometer->get_map_len(gr);
-   evas_common_gradient2_map(dc, gr, len);
-}
-
-static void
-eng_gradient2_linear_render_post(void *data __UNUSED__, void *linear_gradient __UNUSED__)
-{
-}
-
-static void
-eng_gradient2_linear_draw(void *data __UNUSED__, void *context, void *surface, void *linear_gradient, int x, int y, int w, int h)
-{
-#ifdef BUILD_PIPE_RENDER
-   if ((cpunum > 1)
-#ifdef EVAS_FRAME_QUEUING
-        && evas_common_frameq_enabled()
-#endif
-        )
-     evas_common_pipe_grad2_draw(surface, context, x, y, w, h, linear_gradient);
-   else
-#endif
-     evas_common_gradient2_draw(surface, context, x, y, w, h, linear_gradient);
-}
-
-static void *
-eng_gradient2_radial_new(void *data __UNUSED__)
-{
-   return evas_common_gradient2_radial_new();
-}
-
-static void
-eng_gradient2_radial_free(void *data __UNUSED__, void *radial_gradient)
-{
-   evas_common_gradient2_free(radial_gradient);
-}
-
-static void
-eng_gradient2_radial_fill_set(void *data __UNUSED__, void *radial_gradient, float cx, float cy, float rx, float ry)
-{
-   evas_common_gradient2_radial_fill_set(radial_gradient, cx, cy, rx, ry);
-}
-
-static int
-eng_gradient2_radial_is_opaque(void *data __UNUSED__, void *context, void *radial_gradient, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
-{
-   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
-   RGBA_Gradient2 *gr = (RGBA_Gradient2 *)radial_gradient;
-
-   if (!dc || !gr || !gr->type.geometer)  return 0;
-   return !(gr->type.geometer->has_alpha(gr, dc->render_op) |
-              gr->type.geometer->has_mask(gr, dc->render_op));
-}
-
-static int
-eng_gradient2_radial_is_visible(void *data __UNUSED__, void *context, void *radial_gradient, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
-{
-   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
-
-   if (!dc || !radial_gradient)  return 0;
-   return 1;
-}
-
-static void
-eng_gradient2_radial_render_pre(void *data __UNUSED__, void *context, void *radial_gradient)
-{
-   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
-   RGBA_Gradient2 *gr = (RGBA_Gradient2 *)radial_gradient;
-   int  len;
-
-   if (!dc || !gr || !gr->type.geometer)  return;
-   gr->type.geometer->geom_update(gr);
-   len = gr->type.geometer->get_map_len(gr);
-   evas_common_gradient2_map(dc, gr, len);
-}
-
-static void
-eng_gradient2_radial_render_post(void *data __UNUSED__, void *radial_gradient __UNUSED__)
-{
-}
-
-static void
-eng_gradient2_radial_draw(void *data __UNUSED__, void *context, void *surface, void *radial_gradient, int x, int y, int w, int h)
-{
-#ifdef BUILD_PIPE_RENDER
-   if ((cpunum > 1)
-#ifdef EVAS_FRAME_QUEUING
-        && evas_common_frameq_enabled()
-#endif
-        )
-     evas_common_pipe_grad2_draw(surface, context, x, y, w, h, radial_gradient);
-   else
-#endif
-     evas_common_gradient2_draw(surface, context, x, y, w, h, radial_gradient);
-}
-
-static void *
-eng_gradient_new(void *data __UNUSED__)
-{
-   return evas_common_gradient_new();
-}
-
-static void
-eng_gradient_free(void *data __UNUSED__, void *gradient)
-{
-   evas_common_gradient_free(gradient);
-}
-
-static void
-eng_gradient_color_stop_add(void *data __UNUSED__, void *gradient, int r, int g, int b, int a, int delta)
-{
-   evas_common_gradient_color_stop_add(gradient, r, g, b, a, delta);
-}
-
-static void
-eng_gradient_alpha_stop_add(void *data __UNUSED__, void *gradient, int a, int delta)
-{
-   evas_common_gradient_alpha_stop_add(gradient, a, delta);
-}
-
-static void
-eng_gradient_color_data_set(void *data __UNUSED__, void *gradient, void *map, int len, int has_alpha)
-{
-   evas_common_gradient_color_data_set(gradient, map, len, has_alpha);
-}
-
-static void
-eng_gradient_alpha_data_set(void *data __UNUSED__, void *gradient, void *alpha_map, int len)
-{
-   evas_common_gradient_alpha_data_set(gradient, alpha_map, len);
-}
-
-static void
-eng_gradient_clear(void *data __UNUSED__, void *gradient)
-{
-   evas_common_gradient_clear(gradient);
-}
-
-static void
-eng_gradient_fill_set(void *data __UNUSED__, void *gradient, int x, int y, int w, int h)
-{
-   evas_common_gradient_fill_set(gradient, x, y, w, h);
-}
-
-static void
-eng_gradient_fill_angle_set(void *data __UNUSED__, void *gradient, double angle)
-{
-   evas_common_gradient_fill_angle_set(gradient, angle);
-}
-
-static void
-eng_gradient_fill_spread_set(void *data __UNUSED__, void *gradient, int spread)
-{
-   evas_common_gradient_fill_spread_set(gradient, spread);
-}
-
-static void
-eng_gradient_angle_set(void *data __UNUSED__, void *gradient, double angle)
-{
-   evas_common_gradient_map_angle_set(gradient, angle);
-}
-
-static void
-eng_gradient_offset_set(void *data __UNUSED__, void *gradient, float offset)
-{
-   evas_common_gradient_map_offset_set(gradient, offset);
-}
-
-static void
-eng_gradient_direction_set(void *data __UNUSED__, void *gradient, int direction)
-{
-   evas_common_gradient_map_direction_set(gradient, direction);
-}
-
-static void
-eng_gradient_type_set(void *data __UNUSED__, void *gradient, char *name, char *params)
-{
-   evas_common_gradient_type_set(gradient, name, params);
-}
-
-static int
-eng_gradient_is_opaque(void *data __UNUSED__, void *context, void *gradient, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
-{
-   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
-   RGBA_Gradient *gr = (RGBA_Gradient *)gradient;
-
-   if (!dc || !gr || !gr->type.geometer)  return 0;
-   return !(gr->type.geometer->has_alpha(gr, dc->render_op) |
-              gr->type.geometer->has_mask(gr, dc->render_op));
-}
-
-static int
-eng_gradient_is_visible(void *data __UNUSED__, void *context, void *gradient, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
-{
-   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
-
-   if (!dc || !gradient)  return 0;
-   return 1;
-}
-
-static void
-eng_gradient_render_pre(void *data __UNUSED__, void *context, void *gradient)
-{
-   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
-   RGBA_Gradient *gr = (RGBA_Gradient *)gradient;
-   int  len;
-
-   if (!dc || !gr || !gr->type.geometer)  return;
-   gr->type.geometer->geom_set(gr);
-   len = gr->type.geometer->get_map_len(gr);
-   evas_common_gradient_map(dc, gr, len);
-}
-
-static void
-eng_gradient_render_post(void *data __UNUSED__, void *gradient __UNUSED__)
-{
-}
-
-static void
-eng_gradient_draw(void *data __UNUSED__, void *context, void *surface, void *gradient, int x, int y, int w, int h)
-{
-#ifdef BUILD_PIPE_RENDER
-   if ((cpunum > 1)
-#ifdef EVAS_FRAME_QUEUING
-        && evas_common_frameq_enabled()
-#endif
-        )
-     evas_common_pipe_grad_draw(surface, context, x, y, w, h, gradient);
-   else
-#endif   
-     {
-       evas_common_gradient_draw(surface, context, x, y, w, h, gradient);
-       evas_common_cpu_end_opt();
-     }
-}
-
 static int
 eng_image_alpha_get(void *data __UNUSED__, void *image)
 {
@@ -545,6 +257,31 @@ eng_image_colorspace_get(void *data __UNUSED__, void *image)
    return im->space;
 }
 
+static void
+eng_image_mask_create(void *data __UNUSED__, void *image)
+{
+   RGBA_Image *im;
+   int sz;
+   uint8_t *dst,*end;
+   uint32_t *src;
+
+   if (!image) return;
+   im = image;
+   if (im->mask.mask && !im->mask.dirty) return;
+
+   if (im->mask.mask) free(im->mask.mask);
+   sz = im->cache_entry.w * im->cache_entry.h;
+   im->mask.mask = malloc(sz);
+   dst = im->mask.mask;
+   if (!im->image.data)
+      evas_cache_image_load_data(&im->cache_entry);
+   src = im->image.data;
+   for (end = dst + sz ; dst < end ; dst ++, src ++)
+      *dst = *src >> 24;
+   im->mask.dirty = 0;
+}
+
+
 static void *
 eng_image_alpha_set(void *data __UNUSED__, void *image, int has_alpha)
 {
@@ -607,9 +344,10 @@ eng_image_colorspace_set(void *data __UNUSED__, void *image, int cspace)
    evas_cache_image_colorspace(im, cspace);
 }
 
-static void
-eng_image_native_set(void *data __UNUSED__, void *image __UNUSED__, void *native __UNUSED__)
+static void *
+eng_image_native_set(void *data __UNUSED__, void *image, void *native __UNUSED__)
 {
+   return image;
 }
 
 static void *
@@ -733,7 +471,6 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data)
                  if (!im->cs.no_free) free(im->cs.data);
               }
             im->cs.data = image_data;
-            evas_common_image_colorspace_dirty(im);
          }
         break;
       default:
@@ -775,10 +512,11 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image,
 #endif
         )
      {
-        evas_common_rgba_image_scalecache_prepare(im, surface, context, smooth,
+        evas_common_rgba_image_scalecache_prepare((Image_Entry *)(im),
+                                                  surface, context, smooth,
                                                   src_x, src_y, src_w, src_h,
                                                   dst_x, dst_y, dst_w, dst_h);
-        
+
         evas_common_pipe_image_draw(im, surface, context, smooth,
                                     src_x, src_y, src_w, src_h,
                                     dst_x, dst_y, dst_w, dst_h);
@@ -795,7 +533,7 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image,
         evas_common_rgba_image_scalecache_do(&im->cache_entry, surface, context, smooth,
                                              src_x, src_y, src_w, src_h,
                                              dst_x, dst_y, dst_w, dst_h);
-/*        
+/*
        if (smooth)
          evas_common_scale_rgba_in_to_out_clip_smooth(im, surface, context,
                                                       src_x, src_y, src_w, src_h,
@@ -810,14 +548,14 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image,
 }
 
 static void
-eng_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level)
+eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level)
 {
-   RGBA_Image *im, *srf;
-   RGBA_Map_Point *pt = p;
+   RGBA_Image *im;
 
    if (!image) return;
+   if (npoints < 3) return;
    im = image;
-   srf = surface;
+
    if ((p[0].x == p[3].x) &&
        (p[1].x == p[2].x) &&
        (p[0].y == p[1].y) &&
@@ -826,12 +564,12 @@ eng_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *i
        (p[0].y <= p[2].y) &&
        (p[0].u == 0) &&
        (p[0].v == 0) &&
-       (p[1].u == (im->cache_entry.w << FP)) &&
+       (p[1].u == (int)(im->cache_entry.w << FP)) &&
        (p[1].v == 0) &&
-       (p[2].u == (im->cache_entry.w << FP)) &&
-       (p[2].v == (im->cache_entry.h << FP)) &&
+       (p[2].u == (int)(im->cache_entry.w << FP)) &&
+       (p[2].v == (int)(im->cache_entry.h << FP)) &&
        (p[3].u == 0) &&
-       (p[3].v == (im->cache_entry.h << FP)) &&
+       (p[3].v == (int)(im->cache_entry.h << FP)) &&
        (p[0].col == 0xffffffff) &&
        (p[1].col == 0xffffffff) &&
        (p[2].col == 0xffffffff) &&
@@ -856,13 +594,18 @@ eng_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *i
        && evas_common_frameq_enabled()
 # endif
         )
-          evas_common_pipe_map4_draw(im, surface, context, p, smooth, level);
+          evas_common_pipe_map_draw(im, surface, context, npoints, p, smooth, level);
         else
 #endif
-          evas_common_map4_rgba(im, surface, context, p, smooth, level);
+          evas_common_map_rgba(im, surface, context, npoints, p, smooth, level);
      }
    evas_common_cpu_end_opt();
 
+   if (npoints > 4)
+     {
+        eng_image_map_draw(data, context, surface, image, npoints - 2, p + 2,
+                       smooth, level);
+     }
 }
 
 static void *
@@ -982,55 +725,55 @@ eng_font_max_descent_get(void *data __UNUSED__, void *font)
 }
 
 static void
-eng_font_string_size_get(void *data __UNUSED__, void *font, const char *text, int *w, int *h)
+eng_font_string_size_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_BiDi_Props *intl_props, int *w, int *h)
 {
-   evas_common_font_query_size(font, text, w, h);
+   evas_common_font_query_size(font, text, intl_props, w, h);
 }
 
 static int
-eng_font_inset_get(void *data __UNUSED__, void *font, const char *text)
+eng_font_inset_get(void *data __UNUSED__, void *font, const Eina_Unicode *text)
 {
    return evas_common_font_query_inset(font, text);
 }
 
 static int
-eng_font_h_advance_get(void *data __UNUSED__, void *font, const char *text)
+eng_font_h_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_BiDi_Props *intl_props)
 {
    int h, v;
 
-   evas_common_font_query_advance(font, text, &h, &v);
+   evas_common_font_query_advance(font, text, intl_props, &h, &v);
    return h;
 }
 
 static int
-eng_font_v_advance_get(void *data __UNUSED__, void *font, const char *text)
+eng_font_v_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_BiDi_Props *intl_props)
 {
    int h, v;
 
-   evas_common_font_query_advance(font, text, &h, &v);
+   evas_common_font_query_advance(font, text, intl_props, &h, &v);
    return v;
 }
 
 static int
-eng_font_char_coords_get(void *data __UNUSED__, void *font, const char *text, int pos, int *cx, int *cy, int *cw, int *ch)
+eng_font_char_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_BiDi_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch)
 {
-   return evas_common_font_query_char_coords(font, text, pos, cx, cy, cw, ch);
+   return evas_common_font_query_char_coords(font, text, intl_props, pos, cx, cy, cw, ch);
 }
 
 static int
-eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const char *text, int x, int y, int *cx, int *cy, int *cw, int *ch)
+eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_BiDi_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch)
 {
-   return evas_common_font_query_text_at_pos(font, text, x, y, cx, cy, cw, ch);
+   return evas_common_font_query_char_at_coords(font, text, intl_props, x, y, cx, cy, cw, ch);
 }
 
 static int
-eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const char *text, int x, int y)
+eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_BiDi_Props *intl_props, int x, int y)
 {
-   return evas_common_font_query_last_up_to_pos(font, text, x, y);
+   return evas_common_font_query_last_up_to_pos(font, text, intl_props, x, y);
 }
 
 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 char *text)
+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_BiDi_Props *intl_props)
 {
 #ifdef BUILD_PIPE_RENDER
    if ((cpunum > 1)
@@ -1038,11 +781,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);
+     evas_common_pipe_text_draw(surface, context, font, x, y, text, intl_props);
    else
 #endif   
      {
-       evas_common_font_draw(surface, context, font, x, y, text);
+       evas_common_font_draw(surface, context, font, x, y, text, intl_props);
        evas_common_cpu_end_opt();
      }
 }
@@ -1115,6 +858,8 @@ static Evas_Func func =
      eng_context_clip_clip,
      eng_context_clip_unset,
      eng_context_clip_get,
+     eng_context_mask_set,
+     eng_context_mask_unset,
      eng_context_color_set,
      eng_context_color_get,
      eng_context_multiplier_set,
@@ -1136,49 +881,6 @@ static Evas_Func func =
      eng_polygon_point_add,
      eng_polygon_points_clear,
      eng_polygon_draw,
-     /* gradient draw funcs */
-     eng_gradient2_color_np_stop_insert,
-     eng_gradient2_clear,
-     eng_gradient2_fill_transform_set,
-     eng_gradient2_fill_spread_set,
-
-     eng_gradient2_linear_new,
-     eng_gradient2_linear_free,
-     eng_gradient2_linear_fill_set,
-     eng_gradient2_linear_is_opaque,
-     eng_gradient2_linear_is_visible,
-     eng_gradient2_linear_render_pre,
-     eng_gradient2_linear_render_post,
-     eng_gradient2_linear_draw,
-
-     eng_gradient2_radial_new,
-     eng_gradient2_radial_free,
-     eng_gradient2_radial_fill_set,
-     eng_gradient2_radial_is_opaque,
-     eng_gradient2_radial_is_visible,
-     eng_gradient2_radial_render_pre,
-     eng_gradient2_radial_render_post,
-     eng_gradient2_radial_draw,
-
-     eng_gradient_new,
-     eng_gradient_free,
-     eng_gradient_color_stop_add,
-     eng_gradient_alpha_stop_add,
-     eng_gradient_color_data_set,
-     eng_gradient_alpha_data_set,
-     eng_gradient_clear,
-     eng_gradient_fill_set,
-     eng_gradient_fill_angle_set,
-     eng_gradient_fill_spread_set,
-     eng_gradient_angle_set,
-     eng_gradient_offset_set,
-     eng_gradient_direction_set,
-     eng_gradient_type_set,
-     eng_gradient_is_opaque,
-     eng_gradient_is_visible,
-     eng_gradient_render_pre,
-     eng_gradient_render_post,
-     eng_gradient_draw,
      /* image draw funcs */
      eng_image_load,
      eng_image_new_from_data,
@@ -1201,6 +903,7 @@ static Evas_Func func =
      eng_image_format_get,
      eng_image_colorspace_set,
      eng_image_colorspace_get,
+     eng_image_mask_create,
      eng_image_native_set,
      eng_image_native_get,
      /* image cache funcs */
@@ -1236,9 +939,11 @@ static Evas_Func func =
      /* more font draw functions */
      eng_font_last_up_to_pos,
      /* FUTURE software generic calls go here (done) */
-     eng_image_map4_draw,
+     eng_image_map_draw,
      eng_image_map_surface_new,
-     eng_image_map_surface_free
+     eng_image_map_surface_free,
+     NULL, // eng_image_content_hint_set - software doesn't use it
+     NULL // eng_image_content_hint_get - software doesn't use it
      /* FUTURE software generic calls go here */
 };
 
@@ -1254,11 +959,12 @@ static int
 module_open(Evas_Module *em)
 {
    if (!em) return 0;
-   _evas_soft_gen_log_dom = eina_log_domain_register("EvasSoftGeneric", EVAS_DEFAULT_LOG_COLOR);
+   _evas_soft_gen_log_dom = eina_log_domain_register
+     ("evas-software_generic", EVAS_DEFAULT_LOG_COLOR);
    if(_evas_soft_gen_log_dom<0)
      {
-       EINA_LOG_ERR("Evas SoftGen : Impossible to create a log domain for the software generic engine.\n");
-       return 0;
+        EINA_LOG_ERR("Can not create a module log domain.");
+        return 0;
      }
    em->functions = (void *)(&func);
    cpunum = eina_cpu_count();
@@ -1266,7 +972,7 @@ module_open(Evas_Module *em)
 }
 
 static void
-module_close(Evas_Module *em)
+module_close(Evas_Module *em __UNUSED__)
 {
   eina_log_domain_unregister(_evas_soft_gen_log_dom);
 }