and fix the dual geometry thing - use the clip cache for uv geometry. perfect!

SVN revision: 43432
This commit is contained in:
Carsten Haitzler 2009-11-03 15:41:36 +00:00
parent 7526d0751e
commit bd0541a0b0
5 changed files with 52 additions and 23 deletions

View File

@ -40,7 +40,7 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
if (!obj->cur.map) return;
p = obj->cur.map->points;
p_end = p + 4;
p_end = p + obj->cur.map->count;
x1 = p->x;
x2 = p->x;
y1 = p->y;
@ -53,10 +53,10 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
if (p->y < y1) y1 = p->y;
if (p->y > y2) y2 = p->y;
}
obj->cur.geometry.x = x1;
obj->cur.geometry.y = y1;
obj->cur.geometry.w = (x2 - x1) + 1;
obj->cur.geometry.h = (y2 - y1) + 1;
obj->cur.map->normal_geometry.x = x1;
obj->cur.map->normal_geometry.y = y1;
obj->cur.map->normal_geometry.w = (x2 - x1);
obj->cur.map->normal_geometry.h = (y2 - y1);
_evas_map_calc_geom_change(obj);
}
@ -137,13 +137,13 @@ evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled)
{
if (!obj->cur.map)
obj->cur.map = _evas_map_new(4);
obj->cur.map->normal_geometry = obj->cur.geometry;
// obj->cur.map->normal_geometry = obj->cur.geometry;
}
else
{
if (obj->cur.map)
{
obj->cur.geometry = obj->cur.map->normal_geometry;
obj->prev.geometry = obj->cur.map->normal_geometry;
_evas_map_calc_geom_change(obj);
}
}
@ -225,7 +225,7 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
obj->cur.map->surface);
obj->cur.map->surface = NULL;
}
obj->cur.geometry = obj->cur.map->normal_geometry;
obj->prev.geometry = obj->cur.map->normal_geometry;
if (!obj->prev.map)
{
_evas_map_free(obj->cur.map);

View File

@ -2557,6 +2557,11 @@ evas_object_image_render_pre(Evas_Object *obj)
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
if (!o->pixel_updates) goto done;
}
if (obj->cur.map != obj->prev.map)
{
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 */
if (!is_v) goto done;
/* clipper changed this is in addition to anything else for obj */

View File

@ -172,23 +172,35 @@ void
evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj)
{
evas_add_rect(rects,
obj->cur.geometry.x,
obj->cur.geometry.y,
obj->cur.geometry.w,
obj->cur.geometry.h);
obj->cur.cache.clip.x,
obj->cur.cache.clip.y,
obj->cur.cache.clip.w,
obj->cur.cache.clip.h);
evas_add_rect(rects,
obj->prev.cache.clip.x,
obj->prev.cache.clip.y,
obj->prev.cache.clip.w,
obj->prev.cache.clip.h);
/*
evas_add_rect(rects,
obj->cur.geometry.x,
obj->cur.geometry.y,
obj->cur.geometry.w,
obj->cur.geometry.h);
//// obj->cur.cache.geometry.x,
//// obj->cur.cache.geometry.y,
//// obj->cur.cache.geometry.w,
//// obj->cur.cache.geometry.h);
evas_add_rect(rects,
obj->prev.geometry.x,
obj->prev.geometry.y,
obj->prev.geometry.w,
obj->prev.geometry.h);
evas_add_rect(rects,
obj->prev.geometry.x,
obj->prev.geometry.y,
obj->prev.geometry.w,
obj->prev.geometry.h);
//// obj->prev.cache.geometry.x,
//// obj->prev.cache.geometry.y,
//// obj->prev.cache.geometry.w,
//// obj->prev.cache.geometry.h);
*/
}
void

View File

@ -387,8 +387,8 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, int
int sw, sh;
int changed = 0;
sw = obj->cur.map->normal_geometry.w;
sh = obj->cur.map->normal_geometry.h;
sw = obj->cur.geometry.w;
sh = obj->cur.geometry.h;
if ((sw <= 0) || (sh <= 0)) return;
p = obj->cur.map->points;
@ -470,8 +470,8 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, int
{
Evas_Object *obj2;
off_x = -obj->cur.map->normal_geometry.x;
off_y = -obj->cur.map->normal_geometry.y;
off_x = -obj->cur.geometry.x;
off_y = -obj->cur.geometry.y;
EINA_INLIST_FOREACH
(evas_object_smart_members_get_direct(obj), obj2)
{

View File

@ -157,8 +157,20 @@ evas_object_clip_recalc(Evas_Object *obj)
if (!(obj->cur.clipper == NULL || obj->cur.clipper->cur.cache.clip.dirty)
&& !obj->cur.cache.clip.dirty) return;
evas_object_coords_recalc(obj);
cx = obj->cur.geometry.x; cy = obj->cur.geometry.y;
cw = obj->cur.geometry.w; ch = obj->cur.geometry.h;
if (obj->cur.map)
{
cx = obj->cur.map->normal_geometry.x;
cy = obj->cur.map->normal_geometry.y;
cw = obj->cur.map->normal_geometry.w;
ch = obj->cur.map->normal_geometry.h;
}
else
{
cx = obj->cur.geometry.x;
cy = obj->cur.geometry.y;
cw = obj->cur.geometry.w;
ch = obj->cur.geometry.h;
}
//// cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y;
//// cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h;
if (obj->cur.color.a == 0) cvis = 0;