diff options
author | Cedric Bail <cedric.bail@samsung.com> | 2013-11-04 12:23:25 +0900 |
---|---|---|
committer | Cedric Bail <cedric.bail@samsung.com> | 2013-11-04 12:23:25 +0900 |
commit | 05e17cb6b61d47897e8f019576cf7891aba97701 (patch) | |
tree | 1fbadc8319d1dbe53378ffaa1a31d19970640cd3 | |
parent | 07c306a2724368ab71a046afc754a99826618bad (diff) |
Revert "evas - clip shutdown fix to avoid invalid mem accesses"
This reverts commit eb6af1f1ff7ee069eff8bab13c0eed5010ef5660.
This commit was making the code much more complex than required. Let's make
eina_cow_free set the value back to its default.
-rw-r--r-- | src/lib/evas/canvas/evas_clip.c | 20 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_main.c | 25 |
2 files changed, 11 insertions, 34 deletions
diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c index 5dfbc4871a..76cddc0301 100644 --- a/src/lib/evas/canvas/evas_clip.c +++ b/src/lib/evas/canvas/evas_clip.c | |||
@@ -369,7 +369,6 @@ _clip_unset(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) | |||
369 | { | 369 | { |
370 | Evas_Object_Protected_Data *obj = _pd; | 370 | Evas_Object_Protected_Data *obj = _pd; |
371 | 371 | ||
372 | if (!obj->cur) return; | ||
373 | if (!obj->cur->clipper) return; | 372 | if (!obj->cur->clipper) return; |
374 | 373 | ||
375 | obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer); | 374 | obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer); |
@@ -387,7 +386,7 @@ _clip_unset(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) | |||
387 | { | 386 | { |
388 | EINA_COW_STATE_WRITE_BEGIN(obj->cur->clipper, state_write, cur) | 387 | EINA_COW_STATE_WRITE_BEGIN(obj->cur->clipper, state_write, cur) |
389 | { | 388 | { |
390 | if (state_write) state_write->have_clipees = 0; | 389 | state_write->have_clipees = 0; |
391 | } | 390 | } |
392 | EINA_COW_STATE_WRITE_END(obj->cur->clipper, state_write, cur); | 391 | EINA_COW_STATE_WRITE_END(obj->cur->clipper, state_write, cur); |
393 | 392 | ||
@@ -418,17 +417,14 @@ _clip_unset(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) | |||
418 | if ((!obj->is_smart) && | 417 | if ((!obj->is_smart) && |
419 | (!((obj->map->cur.map) && (obj->map->cur.usemap)))) | 418 | (!((obj->map->cur.map) && (obj->map->cur.usemap)))) |
420 | { | 419 | { |
421 | if (obj->cur) | 420 | if (evas_object_is_in_output_rect(eo_obj, obj, |
422 | { | ||
423 | if (evas_object_is_in_output_rect(eo_obj, obj, | ||
424 | obj->layer->evas->pointer.x, | ||
425 | obj->layer->evas->pointer.y, 1, 1)) | ||
426 | evas_event_feed_mouse_move(obj->layer->evas->evas, | ||
427 | obj->layer->evas->pointer.x, | 421 | obj->layer->evas->pointer.x, |
428 | obj->layer->evas->pointer.y, | 422 | obj->layer->evas->pointer.y, 1, 1)) |
429 | obj->layer->evas->last_timestamp, | 423 | evas_event_feed_mouse_move(obj->layer->evas->evas, |
430 | NULL); | 424 | obj->layer->evas->pointer.x, |
431 | } | 425 | obj->layer->evas->pointer.y, |
426 | obj->layer->evas->last_timestamp, | ||
427 | NULL); | ||
432 | } | 428 | } |
433 | evas_object_clip_across_check(eo_obj, obj); | 429 | evas_object_clip_across_check(eo_obj, obj); |
434 | } | 430 | } |
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index c779f2d97a..27fc7adfe4 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c | |||
@@ -141,7 +141,6 @@ void | |||
141 | evas_object_free(Evas_Object *eo_obj, int clean_layer) | 141 | evas_object_free(Evas_Object *eo_obj, int clean_layer) |
142 | { | 142 | { |
143 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); | 143 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); |
144 | Evas_Object *eo_obj2; | ||
145 | if (!obj) return; | 144 | if (!obj) return; |
146 | obj->clean_layer = clean_layer; | 145 | obj->clean_layer = clean_layer; |
147 | 146 | ||
@@ -172,21 +171,8 @@ evas_object_free(Evas_Object *eo_obj, int clean_layer) | |||
172 | obj->func->free(eo_obj, obj, obj->private_data); | 171 | obj->func->free(eo_obj, obj, obj->private_data); |
173 | } | 172 | } |
174 | if (!was_smart_child) evas_object_release(eo_obj, obj, obj->clean_layer); | 173 | if (!was_smart_child) evas_object_release(eo_obj, obj, obj->clean_layer); |
175 | EINA_LIST_FREE(obj->clip.clipees, eo_obj2) | 174 | if (obj->clip.clipees) |
176 | { | 175 | eina_list_free(obj->clip.clipees); |
177 | Evas_Object_Protected_Data *obj2 = | ||
178 | eo_data_scope_get(eo_obj2, MY_CLASS); | ||
179 | if ((obj2) && (obj2->cur)) | ||
180 | { | ||
181 | EINA_COW_STATE_WRITE_BEGIN(obj2, state_write, cur) | ||
182 | { | ||
183 | state_write->clipper = NULL; | ||
184 | } | ||
185 | EINA_COW_STATE_WRITE_END(obj2, state_write, cur); | ||
186 | } | ||
187 | } | ||
188 | // if (obj->clip.clipees) | ||
189 | // obj->clip.clipees = eina_list_free(obj->clip.clipees); | ||
190 | obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer); | 176 | obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer); |
191 | evas_object_clip_changes_clean(eo_obj); | 177 | evas_object_clip_changes_clean(eo_obj); |
192 | evas_object_event_callback_all_del(eo_obj); | 178 | evas_object_event_callback_all_del(eo_obj); |
@@ -202,17 +188,12 @@ evas_object_free(Evas_Object *eo_obj, int clean_layer) | |||
202 | } | 188 | } |
203 | if (obj->size_hints) | 189 | if (obj->size_hints) |
204 | { | 190 | { |
205 | EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints); | 191 | EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints); |
206 | obj->size_hints = NULL; | ||
207 | } | 192 | } |
208 | eina_cow_free(evas_object_proxy_cow, obj->proxy); | 193 | eina_cow_free(evas_object_proxy_cow, obj->proxy); |
209 | eina_cow_free(evas_object_map_cow, obj->map); | 194 | eina_cow_free(evas_object_map_cow, obj->map); |
210 | eina_cow_free(evas_object_state_cow, obj->cur); | 195 | eina_cow_free(evas_object_state_cow, obj->cur); |
211 | eina_cow_free(evas_object_state_cow, obj->prev); | 196 | eina_cow_free(evas_object_state_cow, obj->prev); |
212 | obj->cur = NULL; | ||
213 | obj->prev = NULL; | ||
214 | obj->map = NULL; | ||
215 | obj->proxy = NULL; | ||
216 | eo_data_unref(eo_obj, obj->private_data); | 197 | eo_data_unref(eo_obj, obj->private_data); |
217 | obj->private_data = NULL; | 198 | obj->private_data = NULL; |
218 | eo_manual_free(eo_obj); | 199 | eo_manual_free(eo_obj); |