svn update: 56240 (latest:56240)
authorWooHyun Jung <wh0705.jung@samsung.com>
Mon, 24 Jan 2011 03:17:53 +0000 (12:17 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 24 Jan 2011 03:17:53 +0000 (12:17 +0900)
22 files changed:
src/lib/canvas/evas_events.c
src/lib/canvas/evas_map.c
src/lib/canvas/evas_object_image.c
src/lib/canvas/evas_object_main.c
src/lib/canvas/evas_object_textblock.c
src/lib/canvas/evas_render.c
src/lib/engines/common/evas_convert_main.c
src/lib/engines/common/evas_encoding.c
src/lib/engines/common/evas_font_draw.c
src/lib/engines/common/evas_font_query.c
src/lib/engines/common/evas_map_image.c
src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c
src/lib/engines/common/evas_scale_smooth.c
src/lib/engines/common/evas_scale_smooth_scaler_up.c
src/lib/include/evas_common.h
src/lib/include/evas_private.h
src/modules/engines/gl_common/evas_gl_context.c
src/modules/engines/gl_x11/evas_x_main.c
src/modules/loaders/gif/evas_image_load_gif.c
src/modules/loaders/pmaps/evas_image_load_pmaps.c
src/modules/loaders/tga/evas_image_load_tga.c
src/modules/loaders/tiff/evas_image_load_tiff.c

index 6b06d70..92512a4 100644 (file)
@@ -711,7 +711,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
             ev.timestamp = timestamp;
             ev.event_flags = EVAS_EVENT_FLAG_NONE;
 
-            if (copy) copy = eina_list_free(copy);
+            if (copy) eina_list_free(copy);
             while (outs)
               {
                  Evas_Object *obj;
index 68c7ef4..90e4dca 100644 (file)
@@ -868,7 +868,8 @@ static inline void
 _evas_map_util_points_populate(Evas_Map *m, const Evas_Coord x, const Evas_Coord y, const Evas_Coord w, const Evas_Coord h, const Evas_Coord z)
 {
    Evas_Map_Point *p = m->points;
-
+   int i;
+   
    p[0].x = x;
    p[0].y = y;
    p[0].z = z;
@@ -892,15 +893,12 @@ _evas_map_util_points_populate(Evas_Map *m, const Evas_Coord x, const Evas_Coord
    p[3].z = z;
    p[3].u = 0.0;
    p[3].v = h;
-
-   p[0].px = p[0].x;
-   p[0].py = p[0].y;
-   p[1].px = p[1].x;
-   p[1].py = p[1].y;
-   p[2].px = p[2].x;
-   p[2].py = p[2].y;
-   p[3].px = p[3].x;
-   p[3].py = p[3].y;
+   
+   for (i = 0; i < 4; i++)
+     {
+        p[i].px = p[i].x;
+        p[i].py = p[i].y;
+     }
 }
 
 /**
@@ -1080,20 +1078,18 @@ evas_map_util_rotate(Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy)
 
    for (; p < p_end; p++)
      {
-        Evas_Coord x, y, xx, yy;
+        double x, y, xx, yy;
 
-        xx = x = p->x - cx;
-        yy = y = p->y - cy;
+        x = p->x - cx;
+        y = p->y - cy;
 
         xx = (x * cos(r));
         yy = (x * sin(r));
         x = xx + (y * cos(r + (M_PI / 2.0)));
         y = yy + (y * sin(r + (M_PI / 2.0)));
 
-        p->x = x + cx;
-        p->y = y + cy;
-        p->px = p->x;
-        p->py = p->y;
+        p->px = p->x = x + cx;
+        p->py = p->y = y + cy;
      }
 }
 
@@ -1126,7 +1122,7 @@ evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_
 
    for (; p < p_end; p++)
      {
-        Evas_Coord x, y;
+        double x, y;
 
         x = p->x - cx;
         y = p->y - cy;
@@ -1134,10 +1130,8 @@ evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_
         x = (((double)x) * zoomx);
         y = (((double)y) * zoomy);
 
-        p->x = x + cx;
-        p->y = y + cy;
-        p->px = p->x;
-        p->py = p->y;
+        p->px = p->x = x + cx;
+        p->py = p->y = y + cy;
      }
 }
 
@@ -1204,11 +1198,9 @@ evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
              y = yy + (y * sin(rx + M_PI_2));
           }
         
-        p->x = x + cx;
-        p->y = y + cy;
+        p->px = p->x = x + cx;
+        p->py = p->y = y + cy;
         p->z = z + cz;
-        p->px = p->x;
-        p->py = p->y;
      }
 }
 
@@ -1356,7 +1348,7 @@ evas_map_util_3d_perspective(Evas_Map *m,
    m->persp.foc = foc;
    for (; p < p_end; p++)
      {
-        Evas_Coord x, y, zz;
+        double x, y, zz;
 
         if (foc > 0)
           {
index 5b713f6..553ed57 100644 (file)
@@ -2765,11 +2765,12 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
              // draw geom +x +y
              for (; p < p_end; p++, pt++)
                {
-                  pt->x = (p->x + x) << FP;
-                  pt->y = (p->y + y) << FP;
-                  pt->z = (p->z)     << FP;
-                  pt->x3 = p->px << FP;
-                  pt->y3 = p->py << FP;
+                  pt->x = (p->x + (double)x) * FP1;
+                  pt->y = (p->y + (double)y) * FP1;
+                  pt->z = (p->z)             * FP1;
+                  pt->fx = p->px;
+                  pt->fy = p->py;
+                  pt->fz = p->z;
                   pt->u = p->u * FP1;
                   pt->v = p->v * FP1;
                   pt->col = ARGB_JOIN(p->a, p->r, p->g, p->b);
index a6a70e1..c394e93 100644 (file)
@@ -65,7 +65,8 @@ evas_object_change(Evas_Object *obj)
 {
    Eina_List *l;
    Evas_Object *obj2;
-
+   Eina_Bool movch = 0;
+   
    if (obj->layer->evas->nochange)
      {
 //        printf("nochange %p\n", obj);
@@ -74,11 +75,26 @@ evas_object_change(Evas_Object *obj)
 //   else
 //      printf("ch %p\n", obj);
    obj->layer->evas->changed = 1;
-   if (obj->changed) return;
+   if (obj->changed_move)
+     {
+        movch = 1;
+        obj->changed_move = 0;
+        if (!obj->changed_nomove) obj->changed_move_only = 1;
+        if (obj->changed) return;
+     }
+   else
+     {
+        obj->changed_move_only = 0;
+        obj->changed_nomove = 1;
+        if (obj->changed) return;
+     }
 //   obj->changed = 1;
    evas_render_object_recalc(obj);
    /* set changed flag on all objects this one clips too */
-   EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) evas_object_change(obj2);
+   if (!((movch) && (obj->is_static_clip)))
+     {
+        EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) evas_object_change(obj2);
+     }
    if (obj->smart.parent) evas_object_change(obj->smart.parent);
 }
 
@@ -437,6 +453,7 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
    obj->cur.geometry.x = x;
    obj->cur.geometry.y = y;
 ////   obj->cur.cache.geometry.validity = 0;
+   obj->changed_move = 1;
    evas_object_change(obj);
    evas_object_clip_dirty(obj);
    obj->doing.in_move--;
index 47146b8..d964073 100644 (file)
@@ -208,7 +208,7 @@ typedef struct _Evas_Object_Textblock_Format      Evas_Object_Textblock_Format;
  * the current char pointed to and decrements ind but ensures it stays in
  * the text range.
  */
-#define GET_PREV(text, ind) (((ind) > 0) ? (text[(ind)--]) : (text[ind]))
+#define GET_PREV(text, ind) (text ? (((ind) > 0) ? (text[(ind)--]) : (text[ind])) : 0)
 /**
  * @internal
  * @def GET_NEXT(text, ind)
@@ -216,7 +216,7 @@ typedef struct _Evas_Object_Textblock_Format      Evas_Object_Textblock_Format;
  * the current char pointed to and increments indd but ensures it stays in
  * the text range.
  */
-#define GET_NEXT(text, ind) ((text[ind]) ? (text[(ind)++]) : (text[ind]))
+#define GET_NEXT(text, ind) (text ? ((text[ind]) ? (text[(ind)++]) : (text[ind])) : 0)
 
 /*FIXME: document the structs and struct items. */
 struct _Evas_Object_Style_Tag
@@ -2980,11 +2980,8 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
    if (w_ret) *w_ret = c->wmax;
    if (h_ret) *h_ret = c->hmax;
    if ((o->style_pad.l != style_pad_l) || (o->style_pad.r != style_pad_r) ||
-         (o->style_pad.t != style_pad_t) || (o->style_pad.b != style_pad_b))
+       (o->style_pad.t != style_pad_t) || (o->style_pad.b != style_pad_b))
      {
-        Evas_Object_Textblock_Line *lines;
-
-        lines = c->par->lines;
         c->par->lines = NULL;
         o->style_pad.l = style_pad_l;
         o->style_pad.r = style_pad_r;
@@ -3052,9 +3049,7 @@ _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node_Text *
    EINA_INLIST_FOREACH(o->paragraphs->lines, ln)
      {
         Evas_Object_Textblock_Item *it;
-        Evas_Object_Textblock_Line *lnn;
 
-        lnn = (Evas_Object_Textblock_Line *)(((Eina_Inlist *)ln)->next);
         EINA_INLIST_FOREACH(ln->items, it)
           {
              if (it->source_node == n)
@@ -4003,10 +3998,10 @@ _evas_textblock_cursor_nodes_merge(Evas_Textblock_Cursor *cur)
    Evas_Object_Textblock_Node_Text *nnode;
    Evas_Object_Textblock *o;
    int len;
+   if (!cur) return;
 
    len = eina_ustrbuf_length_get(cur->node->unicode);
 
-   if (!cur) return;
    o = (Evas_Object_Textblock *)(cur->obj->object_data);
    nnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->next);
    _evas_textblock_nodes_merge(o, cur->node);
@@ -4540,9 +4535,7 @@ evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur)
      {
         if (cur->node->format_node)
           {
-             cur->node = cur->node;
              cur->pos = _evas_textblock_node_format_pos_get(node);
-
              return EINA_TRUE;
           }
      }
@@ -4692,7 +4685,6 @@ evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur)
    if (!cur) return;
    if (!cur->node) return;
    index = eina_ustrbuf_length_get(cur->node->unicode) - 1;
-   if (index < 0) index = 0;
    cur->pos = index;
 
 }
@@ -4837,8 +4829,7 @@ evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur)
        cur->pos = it->source_pos;
        cur->node = it->source_node;
        index = eina_unicode_strlen(it->text) - 1;
-        if (index < 0) index = 0;
-        if (index >= 0) GET_NEXT(it->text, index);
+        GET_NEXT(it->text, index);
        cur->pos += index;
      }
    else if (fi)
@@ -5976,7 +5967,7 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
              cur->node->format_node = n;
           }
      }
-   if (is_visible)
+   if (is_visible && cur->node)
      {
         eina_ustrbuf_insert_char(cur->node->unicode,
               EVAS_TEXTBLOCK_REPLACEMENT_CHAR, cur->pos);
index 1203e25..8eaebf5 100644 (file)
@@ -617,9 +617,56 @@ pending_change(void *data, void *gdata __UNUSED__)
         obj->pre_render_done = 0;
 //// FIXME: this wipes out changes
         obj->changed = 0;
+        obj->changed_move_only = 0;
+        obj->changed_nomove = 0;
+        obj->changed_move = 0;
      }
    return obj->changed ? EINA_TRUE : EINA_FALSE;
 }
+/*
+static void
+unchange(Evas_Object *obj)
+{
+   Evas_Object *obj2;
+
+   if (!obj->changed) return;
+   obj->changed = 0;
+   obj->changed_move_only = 0;
+   obj->changed_nomove = 0;
+   obj->changed_move = 0;
+   EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
+     {
+        unchange(obj2);
+     }
+}
+
+static int
+chlist(Evas_Object *obj, int i)
+{
+   Evas_Object *obj2;
+   int j;
+   int ret = 0;
+
+   if (!obj->changed) return 0;
+   for (j = 0; j < i; j++) printf(" ");
+   printf("ch2 %p %s %i [%i %i %ix%i] v %i/%i [r%i] %p\n", obj, 
+          obj->type, 
+          obj->changed_move_only,
+          obj->cur.geometry.x,
+          obj->cur.geometry.y,
+          obj->cur.geometry.w,
+          obj->cur.geometry.h,
+          obj->cur.visible,
+          obj->prev.visible,
+          obj->restack,
+          obj->clip.clipees);
+   EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
+     {
+        if (obj2->changed)
+           ret |= chlist(obj2, i + 1);
+     }
+}
+*/
 
 static Eina_Bool
 evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
@@ -691,11 +738,12 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
         pt = pts;
         for (; p < p_end; p++, pt++)
           {
-             pt->x = (p->x + off_x) << FP;
-             pt->y = (p->y + off_y) << FP;
-             pt->z = (p->z)         << FP;
-             pt->x3 = p->px << FP;
-             pt->y3 = p->py << FP;
+             pt->x = (p->x + (double)off_x) * FP1;
+             pt->y = (p->y + (double)off_y) * FP1;
+             pt->z = (p->z)                 * FP1;
+             pt->fx = p->px;
+             pt->fy = p->py;
+             pt->fz = p->z;
              pt->u = p->u * FP1;
              pt->v = p->v * FP1;
              pt->col = ARGB_JOIN(p->a, p->r, p->g, p->b);
@@ -743,23 +791,37 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
                       !evas_object_was_visible(obj2))
                     {
                        obj2->changed = 0;
+                       obj2->changed_move_only = 0;
+                       obj2->changed_nomove = 0;
+                       obj2->changed_move = 0;
                        continue;
                     }
                   if (obj2->changed)
                     {
-                       obj2->changed = 0;
+//                       chlist(obj2, 0);
                        changed = 1;
+                       obj2->changed = 0;
+                       obj2->changed_move_only = 0;
+                       obj2->changed_nomove = 0;
+                       obj2->changed_move = 0;
                        break;
                     }
                }
+//             unchange(obj);
              obj->changed = 0;
+             obj->changed_move_only = 0;
+             obj->changed_nomove = 0;
+             obj->changed_move = 0;
           }
         else
           {
              if (obj->changed)
                {
-                  obj->changed = 0;
                   changed = 1;
+                  obj->changed = 0;
+                  obj->changed_move_only = 0;
+                  obj->changed_nomove = 0;
+                  obj->changed_move = 0;
                }
           }
 
@@ -1338,6 +1400,9 @@ evas_render_updates_internal(Evas *e,
             obj->func->render_post(obj);
             obj->restack = 0;
             obj->changed = 0;
+             obj->changed_move_only = 0;
+             obj->changed_nomove = 0;
+             obj->changed_move = 0;
          }
         else if ((obj->cur.map != obj->prev.map) ||
                  (obj->cur.usemap != obj->prev.usemap))
@@ -1346,6 +1411,9 @@ evas_render_updates_internal(Evas *e,
             obj->func->render_post(obj);
             obj->restack = 0;
             obj->changed = 0;
+             obj->changed_move_only = 0;
+             obj->changed_nomove = 0;
+             obj->changed_move = 0;
           }
 /* moved to other pre-process phase 1
        if (obj->delete_me == 2)
index d52d1cd..da19f9c 100644 (file)
@@ -161,7 +161,7 @@ evas_common_convert_init(void)
 }
 
 EAPI Gfx_Func_Convert
-evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation)
+evas_common_convert_func_get(DATA8 *dest, int w, int h __UNUSED__, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation)
 {
    if ((rmask == 0) && (gmask == 0) && (bmask == 0))
      {
@@ -208,12 +208,6 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
             return evas_common_convert_rgba_to_8bpp_pal_gray64;
 #endif
          }
-       if (depth == 1)
-         {
-         }
-       if (depth == 4)
-         {
-         }
      }
    else
      {
@@ -632,15 +626,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
               return evas_common_convert_rgba_to_8bpp_rgb_111_dith;
 #endif
          }
-       if (depth == 1)
-         {
-         }
-       if (depth == 4)
-         {
-         }
     }
    /* no optimised converter for this... no generic one either. NULL */
    return NULL;
-   h = 0;
-   pal_mode = 0;
 }
index 24989b1..2d2a842 100644 (file)
@@ -10,12 +10,91 @@ evas_common_encoding_utf8_get_next(const char *buf, int *iindex)
     *
     * Returns 0 to indicate there is no next char
     */
-   int index = *iindex, len, r;
-   unsigned char d, d2, d3, d4;
+#if 1
+   int index = *iindex;
+   Eina_Unicode r;
+   unsigned char d;
 
    /* if this char is the null terminator, exit */
-   if (!buf[index])
-     return 0;
+   if ((d = buf[index++]) == 0) return 0;
+     
+   if ((d & 0x80) == 0)
+     { // 1 byte (7bit) - 0xxxxxxx
+        *iindex = index;
+        return d;
+     }
+   if ((d & 0xe0) == 0xc0)
+     { // 2 byte (11bit) - 110xxxxx 10xxxxxx
+        r  = (d & 0x1f) << 6;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f);
+        if (!r) return 0;
+        *iindex = index;
+        return r;
+     }
+   if ((d & 0xf0) == 0xe0)
+     { // 3 byte (16bit) - 1110xxxx 10xxxxxx 10xxxxxx
+        r  = (d & 0x0f) << 12;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 6;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f);
+        if (!r) return 0;
+        *iindex = index;
+        return r;
+     }
+   if ((d & 0xf8) == 0xf0)
+     { // 4 byte (21bit) - 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+        r  = (d & 0x07) << 18;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 12;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 6;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f);
+        if (!r) return 0;
+        *iindex = index;
+        return r;
+     }
+   if ((d & 0xfc) == 0xf8)
+     { // 5 byte (26bit) - 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+        r  = (d & 0x03) << 24;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 18;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 12;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 6;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f);
+        if (!r) return 0;
+        *iindex = index;
+        return r;
+     }
+   if ((d & 0xfe) == 0xfc)
+     { // 6 byte (31bit) - 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+        r  = (d & 0x01) << 30;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 24;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 18;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 12;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f) << 6;
+        if ((d = buf[index++]) == 0) return 0;
+        r |= (d & 0x3f);
+        if (!r) return 0;
+        *iindex = index;
+        return r;
+     }
+   return 0;
+#else
+   int index = *iindex, r, len;
+   unsigned char d, d2, d3, d4;
+   
+   /* if this char is the null terminator, exit */
+   if (!buf[index]) return 0;
      
    d = buf[index++];
 
@@ -29,6 +108,11 @@ evas_common_encoding_utf8_get_next(const char *buf, int *iindex)
      {
        /* 2 bytes */
         d2 = buf[*iindex + 1];
+        if (d2 == 0)
+          {
+             *iindex = *iindex + 1;
+             return 0;
+          }
        r = d & 0x1f; /* copy lower 5 */
        r <<= 6;
        r |= (d2 & 0x3f); /* copy lower 6 */
@@ -37,7 +121,17 @@ evas_common_encoding_utf8_get_next(const char *buf, int *iindex)
      {
        /* 3 bytes */
         d2 = buf[*iindex + 1];
+        if (d2 == 0)
+          {
+             *iindex = *iindex + 1;
+             return 0;
+          }
         d3 = buf[*iindex + 2];
+        if (d3 == 0)
+          {
+             *iindex = *iindex + 2;
+             return 0;
+          }
        r = d & 0x0f; /* copy lower 4 */
        r <<= 6;
        r |= (d2 & 0x3f);
@@ -48,8 +142,23 @@ evas_common_encoding_utf8_get_next(const char *buf, int *iindex)
      {
        /* 4 bytes */
         d2 = buf[*iindex + 1];
+        if (d2 == 0)
+          {
+             *iindex = *iindex + 1;
+             return 0;
+          }
         d3 = buf[*iindex + 2];
+        if (d3 == 0)
+          {
+             *iindex = *iindex + 2;
+             return 0;
+          }
         d4 = buf[*iindex + 3];
+        if (d4 == 0)
+          {
+             *iindex = *iindex + 3;
+             return 0;
+          }
        r = d & 0x0f; /* copy lower 4 */
        r <<= 6;
        r |= (d2 & 0x3f);
@@ -58,9 +167,9 @@ evas_common_encoding_utf8_get_next(const char *buf, int *iindex)
        r <<= 6;
        r |= (d4 & 0x3f);
      }
-
    *iindex = index;
    return r;
+#endif
 }
 
 EAPI Eina_Unicode
index 1d48943..6067f92 100644 (file)
@@ -125,8 +125,10 @@ _fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int index)
    min = item & 0xff;
    if (!fash->bucket[grp])
      fash->bucket[grp] = calloc(1, sizeof(Fash_Int_Map2));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
    if (!fash->bucket[grp]->bucket[maj])
      fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Int_Map));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
    fash->bucket[grp]->bucket[maj]->item[min].fint = fint;
    fash->bucket[grp]->bucket[maj]->item[min].index = index;
 }
@@ -182,8 +184,10 @@ _fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph)
    min = item & 0xff;
    if (!fash->bucket[grp])
      fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
    if (!fash->bucket[grp]->bucket[maj])
      fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
    fash->bucket[grp]->bucket[maj]->item[min] = glyph;
 }
 
index 4fe4579..e570f69 100644 (file)
@@ -178,13 +178,11 @@ evas_common_font_query_inset(RGBA_Font *fn, const Eina_Unicode *text)
 {
    FT_UInt index;
    RGBA_Font_Glyph *fg;
-   int chr;
    int gl;
    RGBA_Font_Int *fi;
 
    fi = fn->fonts->data;
 
-   chr = 0;
    if (!*text) return 0;
    gl = *text;
    if (gl == 0) return 0;
index 288f6a9..7330910 100644 (file)
@@ -168,6 +168,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
              FPc t256;
              
              h = (p[e2].y - p[e1].y) >> FP; // height of edge
+             if (h < 1) h = 1;
              t = (((y << FP) + (FP1 - 1)) - p[e1].y) >> FP;
              x = p[e2].x - p[e1].x;
              x = p[e1].x + ((x * t) / h);
index b55f7a3..e4afbbb 100644 (file)
@@ -3,61 +3,47 @@
 #ifdef BUILD_NEON
 static void
 _op_copy_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
-   uint32_t *e;
-   e = d + l;
-//#ifdef NEON_INSTRINSICS_OK
-#if 0
-   // odd this is faster than the below asm... :(
-   e -= 15;
-   uint32x4_t col1, col2, col3, col4; 
-   // fill a run of 4x4 (16) pixels with the color
-   for (; d < e; d += 16, s += 16) {
-      col1 = vld1q_u32(s+0); // OP
-      col2 = vld1q_u32(s+4); // OP
-      col3 = vld1q_u32(s+8); // OP
-      col4 = vld1q_u32(s+12); // OP
-      vst1q_u32(d+0, col1); // OP
-      vst1q_u32(d+4, col2); // OP
-      vst1q_u32(d+8, col3); // OP
-      vst1q_u32(d+12, col4); // OP
-   }
-   e += 15;
-#else
-   if ((e - d) >= 16)
+   DATA32 *e;
+//   if (((unsigned long)s & 0xf) || ((unsigned long)d & 0xf))
+//     {
+        memcpy(d, s, l * sizeof(DATA32));
+//        return;
+//     }
+/*
+   e = d + l - 23;
+   if (e > d)
      {
-        DATA32 *d2, *d3, *d4;
-        DATA32 *s2, *s3, *s4;
-        e -= 31;
-        d2 = d + 4;
-        d3 = d + 8;
-        d4 = d + 12;
-        s2 = s + 4;
-        s3 = s + 8;
-        s4 = s + 12;
+        int dl;
         asm volatile (
-       ".fpu neon                              \n\t"
-                      "asmloop2:\n\t"
-                      "cmp %[e], %[d]\n\t"
-                      "vld1.32 {d16-d17}, [%[s]]!\n\t"
-                      "vld1.32 {d18-d19}, [%[s2]]!\n\t"
-                      "vld1.32 {d20-d21}, [%[s3]]!\n\t"
-                      "vld1.32 {d22-d23}, [%[s4]]!\n\t"
-                      "vst1.32 {d16-d17}, [%[d]]!\n\t"
-                      "vst1.32 {d18-d19}, [%[d2]]!\n\t"
-                      "vst1.32 {d20-d21}, [%[d3]]!\n\t"
-                      "vst1.32 {d22-d23}, [%[d4]]!\n\t"
-                      "bhi asmloop2\n\t"
+                      ".fpu neon                  \n\t"
+                      "asmloop2:                  \n\t"
+                      "cmp     %[e], %[d]         \n\t" // compare current and end ptr
+                      "pld     [%[s], #64]        \n\t" // preload 64 bytes ahead
+                      "pld     [%[s], #256]       \n\t" // preload 256 bytes ahead
+                      "pld     [%[s], #320]       \n\t" // preload 320 bytes ahead
+                      "vld1.64 {d0-d3},  [%[s]]!  \n\t" // load 256bits (32 bytes 8 pix)
+                      "vld1.64 {d4-d7} , [%[s]]!  \n\t" // load 256bits (32 bytes 8 pix)
+                      "vld1.64 {d8-d11}, [%[s]]!  \n\t" // load 256bits (32 bytes 8 pix)
+                      "vst1.64 {d0-d3},  [%[d]]!  \n\t" // store 256bits (32 bytes 8 pix)
+                      "vst1.64 {d4-d7},  [%[d]]!  \n\t" // store 256bits (32 bytes 8 pix)
+                      "vst1.64 {d8-d11}, [%[d]]!  \n\t" // store 256bits (32 bytes 8 pix)
+                      "bhi asmloop2               \n\t"
                       : // output regs
-                      : [s] "r" (s), [s2] "r" (s2), [s3] "r" (s3), [s4] "r" (s4), [e] "r" (e), [d] "r" (d), [d2] "r" (d2), [d3] "r" (d3), [d4] "r" (d4) // input
-                      : "q8", "q9", "q10", "q11", "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "memory" // clobbered
-                      );
-                e += 31;
+                      : [s] "r" (s), [e] "r" (e), [d] "r" (d) // input
+                      : "q0", "q1", "q2", "q3", "q4", "q5", 
+                      "d0", "d1", "d2", "d3", "d4", "d5", 
+                      "d6", "d7", "d8", "d9", "d10", "d11",
+                      "memory" // clobbered
+                     );
+        e = d + l;
+        dl = l - (l % 24);
+        s = s + dl;
+        d = d + dl;
      }
-#endif   
-   // fixup any leftover pixels in the run
    for (; d < e; d++, s++) {
-      *d = *s; // OP
+      *d = *s;
    }
+ */
 }
 
 #define _op_copy_pan_dp_neon _op_copy_p_dp_neon
index bc01bfc..00d3243 100644 (file)
@@ -167,7 +167,6 @@ evas_common_scale_rgba_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, in
    if (dst_h < 1) dst_h = 1;
 
    src_ptr = src;
-   src_ptr2 = src + src_w;
    dst_ptr = dst;
    for (y = 0; y < dst_h; y++)
      {
index df17f03..a412956 100644 (file)
@@ -52,7 +52,6 @@
    sxx = (dsxx * cx);
    syy = (dsyy * cy);
 
-   sx = sxx >> 16;
    sy = syy >> 16;
 
    if (drh == srh)
index 514d22c..b975cbf 100644 (file)
@@ -804,7 +804,8 @@ struct _RGBA_Polygon_Point
 struct _RGBA_Map_Point
 {
    FPc x, y; // x, y screenspace
-   FPc x3, y3; // x, y 3d space
+   float fx, fy, fz; // x, y, z in floats
+//   FPc x3, y3; // x, y 3d space
    FPc z; // z in world space. optional
    FPc u, v; // u, v in tex coords
    DATA32 col; // color at this point
index b4a4463..9745bc4 100644 (file)
@@ -358,7 +358,7 @@ struct _Evas_Size_Hints
 
 struct _Evas_Map_Point
 {
-   Evas_Coord x, y, z, px, py;
+   double x, y, z, px, py;
    double u, v;
    unsigned char r, g, b, a;
 };
@@ -468,9 +468,9 @@ struct _Evas_Object
    Eina_Bool                   parent_cache_valid : 1;
    Eina_Bool                   repeat_events : 1;
    Eina_Bool                   restack : 1;
-   Eina_Bool                   changed : 1;
-   Eina_Bool                   changed_move : 1;
    Eina_Bool                   is_active : 1;
+   Eina_Bool                   precise_is_inside : 1;
+   Eina_Bool                   is_static_clip : 1;
 
    Eina_Bool                   render_pre : 1;
    Eina_Bool                   rect_del : 1;
@@ -481,8 +481,10 @@ struct _Evas_Object
    Eina_Bool                   in_layer : 1;
    Eina_Bool                   no_propagate : 1;
 
-   Eina_Bool                   precise_is_inside : 1;
-   Eina_Bool                   is_static_clip : 1;
+   Eina_Bool                   changed : 1;
+   Eina_Bool                   changed_move : 1;
+   Eina_Bool                   changed_move_only : 1;
+   Eina_Bool                   changed_nomove : 1;
 };
 
 struct _Evas_Func_Node
index bf4d74d..d7ad88a 100644 (file)
@@ -2537,9 +2537,9 @@ again:
         else
           {
              PUSH_VERTEX(pn,
-                         (p[points[i]].x3 >> FP) + gc->shared->ax, 
-                         (p[points[i]].y3 >> FP) + gc->shared->ay,
-                         (p[points[i]].z >> FP
+                         (p[points[i]].fx) + gc->shared->ax, 
+                         (p[points[i]].fy) + gc->shared->ay,
+                         (p[points[i]].fz
                          + (gc->shared->foc - gc->shared->z0));
           }
         PUSH_TEXUV(pn,
index 6953620..95437dd 100644 (file)
@@ -713,6 +713,7 @@ eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo)
              if ((!configs) || (num < 1))
                {
                   ERR("glXChooseFBConfig returned no configs");
+                  return NULL;
                }
              for (i = 0; i < num; i++)
                {
index 65f9733..699e9c0 100644 (file)
@@ -4,6 +4,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 #include <gif_lib.h>
 
index 2e054c3..f13ffc4 100644 (file)
@@ -176,6 +176,8 @@ pmaps_buffer_open(Pmaps_Buffer *b, const char *filename, int *error)
    if (len < 3)
      {
        *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
+        fclose(b->file);
+        b->file = NULL;
        return EINA_FALSE;
      }
 
index 5a0a951..b18c1a1 100644 (file)
@@ -7,6 +7,7 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
+#include <unistd.h>
 
 #ifdef HAVE_EVIL
 # include <Evil.h>
@@ -73,8 +74,8 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
    unsigned char *seg = MAP_FAILED, *filedata;
    struct stat ss;
    tga_header *header;
-   tga_footer *footer;
-   char hasa = 0, footer_present = 0, vinverted = 0, rle = 0;
+   tga_footer *footer, tfooter;
+   char hasa = 0, footer_present = 0, vinverted = 0;
    int w = 0, h = 0, bpp;
 
    fd = open(file, O_RDONLY);
@@ -93,7 +94,8 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
    header = (tga_header *)filedata;
    // no unaligned data accessed, so ok
    footer = (tga_footer *)(filedata + (ss.st_size - sizeof(tga_footer)));
-   if (!memcmp(footer->signature, TGA_SIGNATURE, sizeof(footer->signature)))
+   memcpy(&tfooter, footer, sizeof(tga_footer));
+   if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature)))
      {
         // footer is there and matches. this is a tga file - any problems now
         // are a corrupt file
@@ -106,11 +108,11 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
      {
      case TGA_TYPE_COLOR_RLE:
      case TGA_TYPE_GRAY_RLE:
-        rle = 1;
+//        rle = 1;
         break;
      case TGA_TYPE_COLOR:
      case TGA_TYPE_GRAY:
-        rle = 0;
+//        rle = 0;
         break;
      default:
         goto close_file;
@@ -148,7 +150,7 @@ evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key
    unsigned char *seg = MAP_FAILED, *filedata;
    struct stat ss;
    tga_header *header;
-   tga_footer *footer;
+   tga_footer *footer, tfooter;
    char hasa = 0, footer_present = 0, vinverted = 0, rle = 0;
    int w = 0, h = 0, x, y, bpp;
    unsigned int *surface, *dataptr;
@@ -171,7 +173,8 @@ evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key
    header = (tga_header *)filedata;
    // no unaligned data accessed, so ok
    footer = (tga_footer *)(filedata + (ss.st_size - sizeof(tga_footer)));
-   if (!memcmp(footer->signature, TGA_SIGNATURE, sizeof(footer->signature)))
+   memcpy(&tfooter, footer, sizeof(tga_footer));
+   if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature)))
      {
         // footer is there and matches. this is a tga file - any problems now
         // are a corrupt file
@@ -225,8 +228,6 @@ evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key
    bufptr = filedata + header->idLength;
    bufend = filedata + datasize;
 
-   dataptr = surface;
-
    if (!rle)
      {
         for (y = 0; y < h; y++)
index ee9dc21..4c5b9c1 100644 (file)
@@ -2,7 +2,9 @@
 # include <config.h>
 #endif
 
+#include <sys/types.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <tiffio.h>
 
 #ifdef HAVE_EVIL