/* data anymore we can free it if the object deems this is a good idea */
o = (Evas_Object_Gradient *)(obj->object_data);
/* remove those pesky changes */
- while (obj->clip.changes)
- {
- Evas_Rectangle *r;
-
- r = (Evas_Rectangle *)obj->clip.changes->data;
- obj->clip.changes = eina_list_remove(obj->clip.changes, r);
- free(r);
- }
+ evas_object_clip_changes_clean(obj);
/* move cur to prev safely for object data */
obj->prev = obj->cur;
if (o->prev.type.name && (o->prev.type.name != o->cur.type.name))
o = (Evas_Object_Gradient2_Linear *)(obj->object_data);
og = (Evas_Object_Gradient2 *)(o);
/* remove those pesky changes */
- while (obj->clip.changes)
- {
- Evas_Rectangle *r;
-
- r = (Evas_Rectangle *)obj->clip.changes->data;
- obj->clip.changes = eina_list_remove(obj->clip.changes, r);
- free(r);
- }
+ evas_object_clip_changes_clean(obj);
/* move cur to prev safely for object data */
obj->prev = obj->cur;
obj->changed = 0;
o = (Evas_Object_Gradient2_Radial *)(obj->object_data);
og = (Evas_Object_Gradient2 *)(o);
/* remove those pesky changes */
- while (obj->clip.changes)
- {
- Evas_Rectangle *r;
-
- r = (Evas_Rectangle *)obj->clip.changes->data;
- obj->clip.changes = eina_list_remove(obj->clip.changes, r);
- free(r);
- }
+ evas_object_clip_changes_clean(obj);
/* move cur to prev safely for object data */
obj->prev = obj->cur;
obj->changed = 0;
/* data anymore we can free it if the object deems this is a good idea */
o = (Evas_Object_Image *)(obj->object_data);
/* remove those pesky changes */
- EINA_LIST_FREE(obj->clip.changes, r)
- eina_mempool_free(_evas_rectangle_mp, r);
+ evas_object_clip_changes_clean(obj);
EINA_LIST_FREE(o->pixel_updates, r)
eina_mempool_free(_evas_rectangle_mp, r);
/* move cur to prev safely for object data */
/* data anymore we can free it if the object deems this is a good idea */
o = (Evas_Object_Line *)(obj->object_data);
/* remove those pesky changes */
- while (obj->clip.changes)
- {
- Evas_Rectangle *r;
-
- r = (Evas_Rectangle *)obj->clip.changes->data;
- obj->clip.changes = eina_list_remove(obj->clip.changes, r);
- free(r);
- }
+ evas_object_clip_changes_clean(obj);
/* move cur to prev safely for object data */
obj->prev = obj->cur;
o->prev = o->cur;
}
void
+evas_object_clip_changes_clean(Evas_Object *obj)
+{
+ Evas_Rectangle *r;
+
+ EINA_LIST_FREE(obj->clip.changes, r)
+ eina_mempool_free(_evas_rectangle_mp, r);
+}
+
+
+void
evas_object_render_pre_effect_updates(Evas_Rectangles *rects, Evas_Object *obj, int is_v, int was_v)
{
Evas_Rectangle *r;
}
else
{
- while (obj->clip.changes)
- {
- free(obj->clip.changes->data);
- obj->clip.changes = eina_list_remove(obj->clip.changes, obj->clip.changes->data);
- }
+ evas_object_clip_changes_clean(obj);
for (i = 0; i < rects->count; ++i)
{
- r = malloc(sizeof(Evas_Rectangle));
+ r = eina_mempool_alloc(_evas_rectangle_mp, sizeof (Evas_Rectangle));
if (!r) goto end;
*r = rects->array[i];
/* data anymore we can free it if the object deems this is a good idea */
o = (Evas_Object_Polygon *)(obj->object_data);
/* remove those pesky changes */
- while (obj->clip.changes)
- {
- Evas_Rectangle *r;
-
- r = (Evas_Rectangle *)obj->clip.changes->data;
- obj->clip.changes = eina_list_remove(obj->clip.changes, r);
- free(r);
- }
+ evas_object_clip_changes_clean(obj);
/* move cur to prev safely for object data */
obj->prev = obj->cur;
o->changed = 0;
/* data anymore we can free it if the object deems this is a good idea */
o = (Evas_Object_Rectangle *)(obj->object_data);
/* remove those pesky changes */
- while (obj->clip.changes)
- {
- Evas_Rectangle *r;
-
- r = (Evas_Rectangle *)obj->clip.changes->data;
- obj->clip.changes = eina_list_remove(obj->clip.changes, r);
- free(r);
- }
+ evas_object_clip_changes_clean(obj);
/* move cur to prev safely for object data */
obj->prev = obj->cur;
}
/* data anymore we can free it if the object deems this is a good idea */
o = (Evas_Object_Text *)(obj->object_data);
/* remove those pesky changes */
- while (obj->clip.changes)
- {
- Evas_Rectangle *r;
-
- r = (Evas_Rectangle *)obj->clip.changes->data;
- obj->clip.changes = eina_list_remove(obj->clip.changes, r);
- free(r);
- }
+ evas_object_clip_changes_clean(obj);
/* move cur to prev safely for object data */
obj->prev = obj->cur;
o->prev = o->cur;
/* data anymore we can free it if the object deems this is a good idea */
o = (Evas_Object_Textblock *)(obj->object_data);
/* remove those pesky changes */
- EINA_LIST_FREE(obj->clip.changes, r)
- eina_mempool_free(_evas_rectangle_mp, r);
+ evas_object_clip_changes_clean(obj);
/* move cur to prev safely for object data */
obj->prev = obj->cur;
// o->prev = o->cur;
{
Evas_Rectangle *rect;
- rect = malloc(sizeof(Evas_Rectangle));
+ NEW_RECT(rect, ux, uy, uw, uh);
if (rect)
- {
- rect->x = ux; rect->y = uy; rect->w = uw; rect->h = uh;
- updates = eina_list_append(updates, rect);
- }
+ updates = eina_list_append(updates, rect);
}
off_x = cx - ux;
off_y = cy - uy;
EAPI void
evas_render_updates_free(Eina_List *updates)
{
- while (updates)
- {
- free(updates->data);
- updates = eina_list_remove(updates, updates->data);
- }
+ Evas_Rectangle *r;
+
+ EINA_LIST_FREE(updates, r)
+ eina_mempool_free(_evas_rectangle_mp, r);
}
/**
void evas_object_inject(Evas_Object *obj, Evas *e);
void evas_object_release(Evas_Object *obj, int clean_layer);
void evas_object_change(Evas_Object *obj);
+void evas_object_clip_changes_clean(Evas_Object *obj);
void evas_object_render_pre_visible_change(Evas_Rectangles *rects, Evas_Object *obj, int is_v, int was_v);
void evas_object_render_pre_clipper_change(Evas_Rectangles *rects, Evas_Object *obj);
void evas_object_render_pre_prev_cur_add(Evas_Rectangles *rects, Evas_Object *obj);