evas/map - fixed afterimage problem. now we don't need work-around code anymore.
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 30 May 2012 10:12:10 +0000 (10:12 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 30 May 2012 10:12:10 +0000 (10:12 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@71549 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_map.c
src/lib/canvas/evas_object_image.c
src/lib/canvas/evas_object_line.c
src/lib/canvas/evas_object_polygon.c
src/lib/canvas/evas_object_rectangle.c
src/lib/canvas/evas_object_smart.c
src/lib/canvas/evas_object_text.c
src/lib/canvas/evas_object_textblock.c
src/lib/canvas/evas_render.c

index 33b6a0b..cc110c8 100644 (file)
@@ -408,14 +408,6 @@ evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled)
           {
              _evas_map_calc_geom_change(obj);
              evas_object_mapped_clip_across_mark(obj);
-             //FIXME: Since the last frame is not updated when map is
-             //disabled, afterimage problem is happened in s/w rendering.
-             //Need to find out the fundamental reason then fix it.
-             evas_damage_rectangle_add(obj->layer->evas,
-                                       0,
-                                       0,
-                                       obj->layer->evas->output.w,
-                                       obj->layer->evas->output.h);
           }
      }
    _evas_map_calc_map_geometry(obj);
@@ -476,6 +468,8 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
      {
         if (obj->cur.map)
           {
+             obj->changed_map = EINA_TRUE;
+
              if (obj->cur.map->surface)
                {
                   obj->layer->evas->engine.func->image_map_surface_free
@@ -496,28 +490,14 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
              if (!obj->cur.usemap) _evas_map_calc_geom_change(obj);
              else _evas_map_calc_map_geometry(obj);
              if (obj->cur.usemap)
-               {
-                  evas_object_mapped_clip_across_mark(obj);
-                  //FIXME: Since the last frame is not updated when map is
-                  //disabled, afterimage problem is happened in s/w
-                  //rendering. Need to find out the fundamental reason
-                  //then fix it.
-                  evas_damage_rectangle_add(obj->layer->evas,
-                                            0,
-                                            0,
-                                            obj->layer->evas->output.w,
-                                            obj->layer->evas->output.h);
-               }
+               evas_object_mapped_clip_across_mark(obj);
           }
         return;
      }
 
+   // We do have the same exact count of point in this map, so just copy it
    if ((obj->cur.map) && (obj->cur.map->count == map->count))
-     {
-        /* We do have the same exact count of point in this map, so just copy it */
-        _evas_map_copy(obj->cur.map, map);
-       if (obj->prev.map == obj->cur.map) obj->prev.map = NULL;
-     }
+     _evas_map_copy(obj->cur.map, map);
    else
      {
         if (obj->cur.map) evas_map_free(obj->cur.map);
@@ -525,6 +505,8 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
         if (obj->cur.usemap)
            evas_object_mapped_clip_across_mark(obj);
      }
+   obj->changed_map = EINA_TRUE;
+
    _evas_map_calc_map_geometry(obj);
 }
 
index aa3c8e8..14bde10 100644 (file)
@@ -3224,8 +3224,7 @@ evas_object_image_render_pre(Evas_Object *obj)
        evas_object_render_pre_visible_change(&e->clip_changes, obj, is_v, was_v);
        if (!o->pixel_updates) goto done;
      }
-   if ((obj->cur.map != obj->prev.map) ||
-       (obj->cur.usemap != obj->prev.usemap))
+   if (obj->changed_map)
      {
        evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
         goto done;
index b09a6e2..d7b0f9d 100644 (file)
@@ -310,10 +310,10 @@ evas_object_line_render_pre(Evas_Object *obj)
        evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
        goto done;
      }
-   if ((obj->cur.map != obj->prev.map) ||
-       (obj->cur.usemap != obj->prev.usemap))
+   if (obj->changed_map)
      {
-       evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
+        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
+                                            obj);
         goto done;
      }
    /* it's not visible - we accounted for it appearing or not so just abort */
index cbc1802..41655c3 100644 (file)
@@ -366,10 +366,10 @@ evas_object_polygon_render_pre(Evas_Object *obj)
         evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
         goto done;
      }
-   if ((obj->cur.map != obj->prev.map) ||
-       (obj->cur.usemap != obj->prev.usemap))
+   if (obj->changed_map)
      {
-        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
+        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
+                                            obj);
         goto done;
      }
    /* it's not visible - we accounted for it appearing or not so just abort */
index 36678e7..a7ccf14 100644 (file)
@@ -194,10 +194,10 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
        evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
        goto done;
      }
-   if ((obj->cur.map != obj->prev.map) ||
-       (obj->cur.usemap != obj->prev.usemap))
+   if (obj->changed_map)
      {
-       evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
+        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
+                                            obj);
         goto done;
      }
    /* it's not visible - we accounted for it appearing or not so just abort */
index 1275d2d..9337551 100644 (file)
@@ -927,8 +927,7 @@ evas_object_smart_render_pre(Evas_Object *obj)
           }
 #endif
      }
-   if ((obj->cur.map != obj->prev.map) ||
-       (obj->cur.usemap != obj->prev.usemap))
+   if (obj->changed_map)
      evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
 
    obj->pre_render_done = EINA_TRUE;
index d976fcb..c410b71 100644 (file)
@@ -1699,11 +1699,10 @@ evas_object_text_render_pre(Evas_Object *obj)
                                              obj, is_v, was_v);
        goto done;
      }
-   if ((obj->cur.map != obj->prev.map) ||
-       (obj->cur.usemap != obj->prev.usemap))
+   if (obj->changed_map)
      {
-       evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, 
-                                           obj);
+        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
+                                            obj);
         goto done;
      }
    /* its not visible - we accounted for it appearing or not so just abort */
index b81744e..21e816a 100644 (file)
@@ -9784,10 +9784,10 @@ evas_object_textblock_render_pre(Evas_Object *obj)
        evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
        goto done;
      }
-   if ((obj->cur.map != obj->prev.map) ||
-       (obj->cur.usemap != obj->prev.usemap))
+   if (obj->changed_map)
      {
-       evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
+        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
+                                            obj);
         goto done;
      }
    /* it's not visible - we accounted for it appearing or not so just abort */
index 5837c3f..70fbffa 100644 (file)
@@ -316,7 +316,7 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
           }
         return clean_them;
      }
-   else if (_evas_render_had_map(obj))
+   else if (hmap)
      {
         RDI(level);
         RD("      had map - restack objs\n");
@@ -1634,8 +1634,7 @@ evas_render_updates_internal(Evas *e,
              obj->restack = EINA_FALSE;
              evas_object_change_reset(obj);
           }
-        else if ((obj->cur.map != obj->prev.map) ||
-                 (obj->cur.usemap != obj->prev.usemap) || clean_them)
+        else if (clean_them)
           {
              RD("    OBJ [%p] post... func2\n", obj);
              obj->func->render_post(obj);