summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_object_image.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 5b2ef9388d..5178e1b1a7 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -2625,12 +2625,23 @@ _image_video_surface_caps_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
2625 *caps = (!o->video_surface ? 0 : o->pixels->video_caps); 2625 *caps = (!o->video_surface ? 0 : o->pixels->video_caps);
2626} 2626}
2627 2627
2628static void
2629_on_image_native_surface_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *einfo EINA_UNUSED)
2630{
2631 evas_object_image_native_surface_set(obj, NULL);
2632}
2633
2628EAPI void 2634EAPI void
2629evas_object_image_native_surface_set(Evas_Object *eo_obj, Evas_Native_Surface *surf) 2635evas_object_image_native_surface_set(Evas_Object *eo_obj, Evas_Native_Surface *surf)
2630{ 2636{
2631 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); 2637 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
2632 return; 2638 return;
2633 MAGIC_CHECK_END(); 2639 MAGIC_CHECK_END();
2640 evas_object_event_callback_del_full
2641 (eo_obj, EVAS_CALLBACK_DEL, _on_image_native_surface_del, NULL);
2642 if (surf) // We need to unset native surf on del to remove shared hash refs
2643 evas_object_event_callback_add
2644 (eo_obj, EVAS_CALLBACK_DEL, _on_image_native_surface_del, NULL);
2634 eo_do(eo_obj, evas_obj_image_native_surface_set(surf)); 2645 eo_do(eo_obj, evas_obj_image_native_surface_set(surf));
2635} 2646}
2636 2647