move those code to the evas_object_smart.
eo_do(eo_obj, evas_obj_smart_need_recalculate_set(1));
}
+static Eina_Bool
+_smart_members_changed_check(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
+{
+ Evas_Object_Protected_Data *o2;
+
+ if (!evas_object_is_visible(eo_obj, obj) &&
+ !evas_object_was_visible(eo_obj, obj))
+ return EINA_FALSE;
+
+ if (!obj->smart.smart) return EINA_TRUE;
+ if (_evas_render_has_map(eo_obj, obj))
+ {
+ if (((obj->changed_pchange) && (obj->changed_map)) ||
+ (obj->changed_color)) return EINA_TRUE;
+ }
+
+ EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), o2)
+ {
+ if (!o2->changed) continue;
+ if (_smart_members_changed_check(o2->object, o2)) return EINA_TRUE;
+ }
+
+ return EINA_FALSE;
+}
+
+Eina_Bool
+evas_object_smart_changed_get(Evas_Object *eo_obj)
+{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
+ Evas_Object_Protected_Data *o2;
+ Eina_Bool changed = EINA_FALSE;
+
+ if (!obj->is_smart) return obj->changed;
+ if (obj->changed_color) return EINA_TRUE;
+
+ EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), o2)
+ {
+ if (!o2->changed) continue;
+ changed = _smart_members_changed_check(o2->object, o2);
+ if (changed) break;
+ }
+ return changed;
+}
+
void
evas_object_smart_del(Evas_Object *eo_obj)
{
}
Eina_Bool
-_smart_members_changed_check(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
-{
- Evas_Object_Protected_Data *o2;
-
- if (!evas_object_is_visible(eo_obj, obj) &&
- !evas_object_was_visible(eo_obj, obj))
- return EINA_FALSE;
-
- if (!obj->smart.smart) return EINA_TRUE;
- if (obj->changed_color) return EINA_TRUE;
- if ((obj->changed_pchange) && (obj->changed_map)) return EINA_TRUE;
-
- EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), o2)
- {
- if (!o2->changed) continue;
- if (_smart_members_changed_check(o2->object, o2)) return EINA_TRUE;
- }
-
- return EINA_FALSE;
-}
-
-Eina_Bool
evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
Evas_Object_Protected_Data *obj, void *context,
void *surface, int off_x, int off_y, int mapped, int ecx,
Eina_Bool clean_them = EINA_FALSE;
Eina_Bool proxy_src_clip = EINA_TRUE;
+ //Don't Render if the source is invisible.
if (!proxy_render_data)
{
if ((evas_object_is_source_invisible(eo_obj, obj)))
if (!changed)
{
if (obj->is_smart)
- {
- Evas_Object_Protected_Data *o2;
-
- EINA_INLIST_FOREACH(
- evas_object_smart_members_get_direct(eo_obj), o2)
- {
- if (!o2->changed) continue;
- changed = _smart_members_changed_check(o2->object, o2);
- if (changed) break;
- }
- if (obj->changed_color) changed = EINA_TRUE;
- }
+ changed = evas_object_smart_changed_get(eo_obj);
else if (obj->changed)
{
if (((obj->changed_pchange) && (obj->changed_map)) ||
void evas_call_smarts_calculate(Evas *e);
void evas_object_smart_bounding_box_update(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
void evas_object_smart_need_bounding_box_update(Evas_Object *obj);
+Eina_Bool evas_object_smart_changed_get(Evas_Object *eo_obj);
void *evas_mem_calloc(int size);
void _evas_post_event_callback_call(Evas *e, Evas_Public_Data* e_pd);
void _evas_post_event_callback_free(Evas *e);