From: Jean-Philippe Andre Date: Thu, 8 Oct 2015 02:19:50 +0000 (+0900) Subject: Evas filter: Fix proxies of filtered images X-Git-Tag: v1.16.0-beta1~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62940b41f29d2620bee3b58342747d54f86474f0;p=platform%2Fupstream%2Fefl.git Evas filter: Fix proxies of filtered images @fix --- diff --git a/src/lib/evas/canvas/evas_filter.eo b/src/lib/evas/canvas/evas_filter.eo index 5f8442f..0d618c5 100644 --- a/src/lib/evas/canvas/evas_filter.eo +++ b/src/lib/evas/canvas/evas_filter.eo @@ -57,6 +57,17 @@ mixin Evas.Filter (Efl.Gfx.Filter) Virtual, to be implemented in the parent class. ]] } + @property output_buffer @protected { + get { + [[Retrieve cached output buffer, if any. + + Does not increment the reference count. + ]] + } + values { + buffer: void*; + } + } } implements { Efl.Gfx.Filter.program.set; diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c index 154c6dc..46bf5fe 100644 --- a/src/lib/evas/canvas/evas_filter_mixin.c +++ b/src/lib/evas/canvas/evas_filter_mixin.c @@ -584,4 +584,10 @@ _evas_filter_efl_gfx_filter_data_set(Eo *obj EINA_UNUSED, Evas_Filter_Data *pd, FCOW_END(fcow, pd); } +EOLIAN void * +_evas_filter_output_buffer_get(Eo *obj EINA_UNUSED, Evas_Filter_Data *pd) +{ + return pd->data->output; +} + #include "evas_filter.eo.c" diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 6b05037..ee19838 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -3290,7 +3290,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y, int l, int t, int r, int b, Eina_Bool do_async) { - Evas_Image_Data *o = obj->private_data; + Evas_Image_Data *o = obj->private_data, *oi = NULL; int imagew, imageh, uvw, uvh; void *pixels; @@ -3298,6 +3298,8 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, (o->cur->source ? eo_data_scope_get(o->cur->source, EVAS_OBJECT_CLASS): NULL); + if (source && (source->type == o_type)) + oi = eo_data_scope_get(o->cur->source, MY_CLASS); if (o->cur->scene) { @@ -3333,13 +3335,16 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, uvw = imagew; uvh = imageh; } - else if (source->type == o_type && - ((Evas_Image_Data *)eo_data_scope_get(o->cur->source, MY_CLASS))->engine_data) + else if (oi && oi->engine_data) { - Evas_Image_Data *oi; - - oi = eo_data_scope_get(o->cur->source, MY_CLASS); pixels = oi->engine_data; + if (oi->has_filter) + { + void *output_buffer = eo_do_ret(source->object, output_buffer, + evas_filter_output_buffer_get()); + if (output_buffer) + pixels = output_buffer; + } imagew = oi->cur->image.w; imageh = oi->cur->image.h; uvw = source->cur->geometry.w;