summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_filter_mixin.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-06-18 21:45:21 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-06-25 14:36:09 +0900
commit29402b2ce965c83cdcbfa29ac08b918ab01d95d2 (patch)
tree1ab6e4c9fc9d0e30985ee8f524edfef02235335a /src/lib/evas/canvas/evas_filter_mixin.c
parent351090f95de447c0d820bb02eb40889ab78b0736 (diff)
Evas filters: Complete support for image filtering
Reusing the new EO mixin, complete the support for image filtering. This now adds support for edje state inside the image filter.
Diffstat (limited to 'src/lib/evas/canvas/evas_filter_mixin.c')
-rw-r--r--src/lib/evas/canvas/evas_filter_mixin.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c
index 20aa8cc..243b359 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -222,21 +222,9 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
222 if (fcow->output != previous) 222 if (fcow->output != previous)
223 evas_filter_buffer_backing_release(filter, previous); 223 evas_filter_buffer_backing_release(filter, previous);
224 224
225 // Request rendering from the object itself (child class)
225 evas_filter_program_padding_get(fcow->chain, &l, &r, &t, &b); 226 evas_filter_program_padding_get(fcow->chain, &l, &r, &t, &b);
226 eo_do(eo_obj, evas_filter_input_render(filter, drawctx, l, r, t, b, do_async)); 227 eo_do(eo_obj, evas_filter_input_render(filter, drawctx, l, r, t, b, do_async));
227#warning TODO: draw text into input buffer
228#if 0
229 // Render text to input buffer
230 EINA_INLIST_FOREACH(EINA_INLIST_GET(pd->items), it)
231 if ((pd->font) && (it->text_props.len > 0))
232 {
233 evas_filter_font_draw(filter, drawctx, EVAS_FILTER_BUFFER_INPUT_ID, pd->font,
234 sl + it->x,
235 st + (int) pd->max_ascent,
236 &it->text_props,
237 do_async);
238 }
239#endif
240 228
241 ENFN->context_free(ENDT, drawctx); 229 ENFN->context_free(ENDT, drawctx);
242 230
@@ -268,6 +256,7 @@ _evas_filter_efl_gfx_filter_program_set(Eo *eo_obj, Evas_Filter_Data *pd,
268{ 256{
269 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); 257 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
270 Evas_Filter_Program *pgm = NULL; 258 Evas_Filter_Program *pgm = NULL;
259 Eina_Bool alpha;
271 260
272 if (!pd) return; 261 if (!pd) return;
273 if (pd->data->code == code) return; 262 if (pd->data->code == code) return;
@@ -280,7 +269,8 @@ _evas_filter_efl_gfx_filter_program_set(Eo *eo_obj, Evas_Filter_Data *pd,
280 evas_filter_program_del(fcow->chain); 269 evas_filter_program_del(fcow->chain);
281 if (code) 270 if (code)
282 { 271 {
283 pgm = evas_filter_program_new("Evas_Text", EINA_TRUE); 272 alpha = eo_do_ret(eo_obj, alpha, evas_filter_input_alpha());
273 pgm = evas_filter_program_new("Evas.Filter", alpha);
284 evas_filter_program_source_set_all(pgm, fcow->sources); 274 evas_filter_program_source_set_all(pgm, fcow->sources);
285 evas_filter_program_state_set(pgm, eo_obj, obj, 275 evas_filter_program_state_set(pgm, eo_obj, obj,
286 fcow->state.cur.name, fcow->state.cur.value, 276 fcow->state.cur.name, fcow->state.cur.value,