fix smart map redraw errors.

SVN revision: 43483
This commit is contained in:
Carsten Haitzler 2009-11-06 08:44:49 +00:00
parent ee3dfadb3b
commit 948bb4a63e
11 changed files with 68 additions and 20 deletions

View File

@ -126,15 +126,15 @@ evas_new(void)
e->hinting = EVAS_FONT_HINTING_BYTECODE; e->hinting = EVAS_FONT_HINTING_BYTECODE;
e->name_hash = eina_hash_string_superfast_new(NULL); e->name_hash = eina_hash_string_superfast_new(NULL);
eina_array_step_set(&e->delete_objects, 16); eina_array_step_set(&e->delete_objects, 256);
eina_array_step_set(&e->active_objects, 16); eina_array_step_set(&e->active_objects, 256);
eina_array_step_set(&e->restack_objects, 16); eina_array_step_set(&e->restack_objects, 256);
eina_array_step_set(&e->render_objects, 16); eina_array_step_set(&e->render_objects, 256);
eina_array_step_set(&e->pending_objects, 16); eina_array_step_set(&e->pending_objects, 256);
eina_array_step_set(&e->obscuring_objects, 16); eina_array_step_set(&e->obscuring_objects, 256);
eina_array_step_set(&e->temporary_objects, 16); eina_array_step_set(&e->temporary_objects, 256);
eina_array_step_set(&e->calculate_objects, 16); eina_array_step_set(&e->calculate_objects, 256);
eina_array_step_set(&e->clip_changes, 16); eina_array_step_set(&e->clip_changes, 256);
return e; return e;
} }

View File

@ -1051,6 +1051,11 @@ evas_object_gradient_render_pre(Evas_Object *obj)
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; goto done;
} }
if (obj->cur.map != obj->prev.map)
{
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 */ /* its not visible - we accounted for it appearing or not so just abort */
if (!is_v) goto done; if (!is_v) goto done;
/* clipper changed this is in addition to anything else for obj */ /* clipper changed this is in addition to anything else for obj */

View File

@ -352,6 +352,11 @@ evas_object_gradient2_linear_render_pre(Evas_Object *obj)
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; goto done;
} }
if (obj->cur.map != obj->prev.map)
{
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 */ /* its not visible - we accounted for it appearing or not so just abort */
if (!is_v) goto done; if (!is_v) goto done;
/* clipper changed this is in addition to anything else for obj */ /* clipper changed this is in addition to anything else for obj */

View File

@ -349,6 +349,11 @@ evas_object_gradient2_radial_render_pre(Evas_Object *obj)
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; goto done;
} }
if (obj->cur.map != obj->prev.map)
{
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 */ /* its not visible - we accounted for it appearing or not so just abort */
if (!is_v) goto done; if (!is_v) goto done;
/* clipper changed this is in addition to anything else for obj */ /* clipper changed this is in addition to anything else for obj */

View File

@ -343,6 +343,11 @@ evas_object_line_render_pre(Evas_Object *obj)
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; 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 */ /* it's not visible - we accounted for it appearing or not so just abort */
if (!is_v) goto done; if (!is_v) goto done;
/* clipper changed this is in addition to anything else for obj */ /* clipper changed this is in addition to anything else for obj */

View File

@ -358,6 +358,11 @@ evas_object_polygon_render_pre(Evas_Object *obj)
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; 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 */ /* it's not visible - we accounted for it appearing or not so just abort */
if (!is_v) goto done; if (!is_v) goto done;
/* clipper changed this is in addition to anything else for obj */ /* clipper changed this is in addition to anything else for obj */

View File

@ -207,6 +207,11 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; 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 */ /* it's not visible - we accounted for it appearing or not so just abort */
if (!is_v) goto done; if (!is_v) goto done;
/* clipper changed this is in addition to anything else for obj */ /* clipper changed this is in addition to anything else for obj */

View File

@ -819,6 +819,12 @@ static void
evas_object_smart_render_pre(Evas_Object *obj) evas_object_smart_render_pre(Evas_Object *obj)
{ {
if (obj->pre_render_done) return; if (obj->pre_render_done) return;
if (obj->cur.map != obj->prev.map)
{
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done;
}
done:
obj->pre_render_done = 1; obj->pre_render_done = 1;
} }

View File

@ -1637,6 +1637,11 @@ evas_object_text_render_pre(Evas_Object *obj)
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; goto done;
} }
if (obj->cur.map != obj->prev.map)
{
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 */ /* its not visible - we accounted for it appearing or not so just abort */
if (!is_v) goto done; if (!is_v) goto done;
/* clipper changed this is in addition to anything else for obj */ /* clipper changed this is in addition to anything else for obj */

View File

@ -5630,6 +5630,11 @@ evas_object_textblock_render_pre(Evas_Object *obj)
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; 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 */ /* it's not visible - we accounted for it appearing or not so just abort */
if (!is_v) goto done; if (!is_v) goto done;
/* clipper changed this is in addition to anything else for obj */ /* clipper changed this is in addition to anything else for obj */

View File

@ -2,7 +2,7 @@
#include "evas_private.h" #include "evas_private.h"
static Eina_List * static Eina_List *
evas_render_updates_internal(Evas *e, Evas_Object *smart, unsigned char make_updates, unsigned char do_draw); evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char do_draw);
/** /**
* Add a damage rectangle. * Add a damage rectangle.
@ -169,7 +169,9 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj, Eina_Array *active
obj->is_active = is_active; obj->is_active = is_active;
if ((is_active) || (obj->delete_me != 0)) if ((is_active) || (obj->delete_me != 0))
eina_array_push(active_objects, obj); {
eina_array_push(active_objects, obj);
}
if (restack) if (restack)
{ {
if (!obj->changed) if (!obj->changed)
@ -511,7 +513,6 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, int
static Eina_List * static Eina_List *
evas_render_updates_internal(Evas *e, evas_render_updates_internal(Evas *e,
Evas_Object *smart, // is this a good idea?
unsigned char make_updates, unsigned char make_updates,
unsigned char do_draw) unsigned char do_draw)
{ {
@ -530,11 +531,6 @@ evas_render_updates_internal(Evas *e,
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (!e->changed) return NULL; if (!e->changed) return NULL;
if (smart)
{
// FIXME: if smart, only consider child objects
}
evas_call_smarts_calculate(e); evas_call_smarts_calculate(e);
/* Check if the modified object mean recalculating every thing */ /* Check if the modified object mean recalculating every thing */
@ -806,6 +802,12 @@ evas_render_updates_internal(Evas *e,
obj->restack = 0; obj->restack = 0;
obj->changed = 0; obj->changed = 0;
} }
else if (obj->cur.map != obj->prev.map)
{
obj->func->render_post(obj);
obj->restack = 0;
obj->changed = 0;
}
/* moved to other pre-process phase 1 /* moved to other pre-process phase 1
if (obj->delete_me == 2) if (obj->delete_me == 2)
{ {
@ -886,7 +888,7 @@ evas_render_updates(Evas *e)
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (!e->changed) return NULL; if (!e->changed) return NULL;
return evas_render_updates_internal(e, NULL, 1, 1); return evas_render_updates_internal(e, 1, 1);
} }
/** /**
@ -905,7 +907,7 @@ evas_render(Evas *e)
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (!e->changed) return; if (!e->changed) return;
evas_render_updates_internal(e, NULL, 0, 1); evas_render_updates_internal(e, 0, 1);
} }
/** /**
@ -929,7 +931,7 @@ evas_norender(Evas *e)
MAGIC_CHECK_END(); MAGIC_CHECK_END();
// if (!e->changed) return; // if (!e->changed) return;
evas_render_updates_internal(e, NULL, 0, 0); evas_render_updates_internal(e, 0, 0);
} }
/** /**