fix fill render bug cedric reported. :)
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 28 Apr 2010 14:38:46 +0000 (14:38 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 28 Apr 2010 14:38:46 +0000 (14:38 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@48393 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_image.c
src/lib/canvas/evas_render.c

index bbda40c..b3e938d 100644 (file)
@@ -2682,6 +2682,7 @@ evas_object_image_render_pre(Evas_Object *obj)
    /* if it changed geometry - and obviously not visibility or color */
    /* caluclate differences since we have a constant color fill */
    /* we really only need to update the differences */
+#if 0 // XXX: maybe buggy?
    if (((obj->cur.geometry.x != obj->prev.geometry.x) ||
        (obj->cur.geometry.y != obj->prev.geometry.y) ||
        (obj->cur.geometry.w != obj->prev.geometry.w) ||
@@ -2704,6 +2705,7 @@ evas_object_image_render_pre(Evas_Object *obj)
                                           obj->prev.geometry.h);
        if (!o->pixel_updates) goto done;
      }
+#endif   
    if (((obj->cur.geometry.x != obj->prev.geometry.x) ||
        (obj->cur.geometry.y != obj->prev.geometry.y) ||
        (obj->cur.geometry.w != obj->prev.geometry.w) ||
index b84dc01..9ec59d0 100644 (file)
@@ -722,8 +722,21 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
                     }
                }
              else
-               obj->func->render(obj, e->engine.data.output, ctx,
-                                 obj->cur.map->surface, off_x, off_y);
+               {
+                  int x = 0, y = 0, w = 0, h = 0;
+                  
+                  w = obj->cur.map->surface_w;
+                  h = obj->cur.map->surface_h;
+                  RECTS_CLIP_TO_RECT(x, y, w, h,
+                                     obj->cur.cache.clip.x + off_x,
+                                     obj->cur.cache.clip.y + off_y,
+                                     obj->cur.cache.clip.w,
+                                     obj->cur.cache.clip.h);
+                  e->engine.func->context_clip_set(e->engine.data.output,
+                                                   ctx, x, y, w, h);
+                  obj->func->render(obj, e->engine.data.output, ctx,
+                                    obj->cur.map->surface, off_x, off_y);
+               }
              e->engine.func->context_free(e->engine.data.output, ctx);
           }
 
@@ -1011,6 +1024,14 @@ evas_render_updates_internal(Evas *e,
                          }
                       if (((w > 0) && (h > 0)) || (obj->smart.smart))
                         {
+                            if (!obj->smart.smart)
+                              {
+                                 RECTS_CLIP_TO_RECT(x, y, w, h,
+                                                    obj->cur.cache.clip.x + off_x,
+                                                    obj->cur.cache.clip.y + off_y,
+                                                    obj->cur.cache.clip.w,
+                                                    obj->cur.cache.clip.h);
+                              }
                            e->engine.func->context_clip_set(e->engine.data.output,
                                                             e->engine.data.context,
                                                             x, y, w, h);