evas/render: Add a flag for dropping the map cache if needed.
The map cache must be dropped if the content of the surface is rendered again. The example evas-smart-object.c has a valid test case for this bug. SVN revision: 75636
This commit is contained in:
parent
cc2ec4105b
commit
be7953b243
|
@ -43,6 +43,9 @@ evas_object_change_reset(Evas_Object *obj)
|
||||||
void
|
void
|
||||||
evas_object_cur_prev(Evas_Object *obj)
|
evas_object_cur_prev(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
if (!obj->prev.valid_map && (obj->prev.map == obj->cur.map))
|
||||||
|
obj->prev.map = NULL;
|
||||||
|
|
||||||
if (obj->cur.map != obj->prev.map)
|
if (obj->cur.map != obj->prev.map)
|
||||||
{
|
{
|
||||||
if (obj->cache_map) evas_map_free(obj->cache_map);
|
if (obj->cache_map) evas_map_free(obj->cache_map);
|
||||||
|
|
|
@ -917,6 +917,11 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
|
||||||
evas_object_change_reset(obj);
|
evas_object_change_reset(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* mark the old map as invalid, so later we don't reuse it as a
|
||||||
|
* cache. */
|
||||||
|
if (changed && obj->prev.map)
|
||||||
|
obj->prev.valid_map = EINA_FALSE;
|
||||||
|
|
||||||
// clear surface before re-render
|
// clear surface before re-render
|
||||||
if ((changed) && (obj->cur.map->surface))
|
if ((changed) && (obj->cur.map->surface))
|
||||||
{
|
{
|
||||||
|
@ -988,6 +993,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
|
||||||
obj->cur.map->surface = e->engine.func->image_dirty_region
|
obj->cur.map->surface = e->engine.func->image_dirty_region
|
||||||
(e->engine.data.output, obj->cur.map->surface,
|
(e->engine.data.output, obj->cur.map->surface,
|
||||||
0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h);
|
0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h);
|
||||||
|
obj->cur.valid_map = EINA_TRUE;
|
||||||
}
|
}
|
||||||
e->engine.func->context_clip_unset(e->engine.data.output,
|
e->engine.func->context_clip_unset(e->engine.data.output,
|
||||||
context);
|
context);
|
||||||
|
|
|
@ -533,6 +533,7 @@ struct _Evas_Object
|
||||||
unsigned char r, g, b, a;
|
unsigned char r, g, b, a;
|
||||||
} color;
|
} color;
|
||||||
Eina_Bool usemap : 1;
|
Eina_Bool usemap : 1;
|
||||||
|
Eina_Bool valid_map : 1;
|
||||||
Eina_Bool visible : 1;
|
Eina_Bool visible : 1;
|
||||||
Eina_Bool have_clipees : 1;
|
Eina_Bool have_clipees : 1;
|
||||||
Eina_Bool anti_alias : 1;
|
Eina_Bool anti_alias : 1;
|
||||||
|
|
Loading…
Reference in New Issue