summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_filter_mixin.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-10-07 18:08:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-07 18:11:32 +0900
commit6e04d407cf1eb9506866f72f0d71c76ec2b80bc4 (patch)
treed153660ed96267e082cac50103e1e0c1e3d6b197 /src/lib/evas/canvas/evas_filter_mixin.c
parenta5747f1ab3ec3d3876b73c08501a1e52404733f0 (diff)
Evas filters: Fix crash with async sw rendering
If the filtered object (text or image object) was deleted, its output image (cached inside the filter data) would be freed immediately. This could cause crashes in case of async rendering. @fix
Diffstat (limited to 'src/lib/evas/canvas/evas_filter_mixin.c')
-rw-r--r--src/lib/evas/canvas/evas_filter_mixin.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c
index 934a8c6..154c6dc 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -254,6 +254,7 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
254 fcow = FCOW_BEGIN(pd); 254 fcow = FCOW_BEGIN(pd);
255 fcow->output = filter_output; 255 fcow->output = filter_output;
256 fcow->changed = EINA_FALSE; 256 fcow->changed = EINA_FALSE;
257 fcow->async = do_async;
257 if (!ok) fcow->invalid = EINA_TRUE; 258 if (!ok) fcow->invalid = EINA_TRUE;
258 FCOW_END(fcow, pd); 259 FCOW_END(fcow, pd);
259 260
@@ -518,7 +519,12 @@ _evas_filter_destructor(Eo *eo_obj, Evas_Filter_Data *pd)
518 if (evas_object_filter_cow_default == pd->data) return; 519 if (evas_object_filter_cow_default == pd->data) return;
519 520
520 if (pd->data->output) 521 if (pd->data->output)
521 ENFN->image_free(ENDT, pd->data->output); 522 {
523 if (!pd->data->async)
524 ENFN->image_free(ENDT, pd->data->output);
525 else
526 evas_unref_queue_image_put(obj->layer->evas, pd->data->output);
527 }
522 eina_hash_free(pd->data->sources); 528 eina_hash_free(pd->data->sources);
523 EINA_INLIST_FOREACH_SAFE(pd->data->data, il, db) 529 EINA_INLIST_FOREACH_SAFE(pd->data->data, il, db)
524 { 530 {