summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_filter_mixin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_filter_mixin.c')
-rw-r--r--src/lib/evas/canvas/evas_filter_mixin.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c
index 2322fec..0933665 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -54,9 +54,8 @@ _filter_end_sync(Evas_Filter_Context *ctx, Evas_Object_Protected_Data *obj,
54 if (!success) 54 if (!success)
55 { 55 {
56 ERR("Filter failed at runtime!"); 56 ERR("Filter failed at runtime!");
57 eo_do(eo_obj, 57 evas_filter_invalid_set(eo_obj, EINA_TRUE);
58 evas_filter_invalid_set(EINA_TRUE); 58 evas_filter_dirty(eo_obj);
59 evas_filter_dirty());
60 evas_object_change(eo_obj, obj); 59 evas_object_change(eo_obj, obj);
61 evas_object_clip_dirty(eo_obj, obj); 60 evas_object_clip_dirty(eo_obj, obj);
62 evas_object_coords_recalc(eo_obj, obj); 61 evas_object_coords_recalc(eo_obj, obj);
@@ -272,8 +271,7 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
272 { 271 {
273 // Post render callback is not required anymore 272 // Post render callback is not required anymore
274 Evas *e = obj->layer->evas->evas; 273 Evas *e = obj->layer->evas->evas;
275 eo_do(e, eo_event_callback_del(EVAS_CANVAS_EVENT_RENDER_POST, 274 eo_event_callback_del(e, EVAS_CANVAS_EVENT_RENDER_POST, _render_post_cb, eo_obj);
276 _render_post_cb, eo_obj));
277 pd->has_cb = EINA_FALSE; 275 pd->has_cb = EINA_FALSE;
278 } 276 }
279 277
@@ -324,7 +322,7 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
324 322
325 // Request rendering from the object itself (child class) 323 // Request rendering from the object itself (child class)
326 evas_filter_program_padding_get(pd->data->chain, &l, &r, &t, &b); 324 evas_filter_program_padding_get(pd->data->chain, &l, &r, &t, &b);
327 eo_do(eo_obj, ok = evas_filter_input_render(filter, drawctx, l, r, t, b, do_async)); 325 ok = evas_filter_input_render(eo_obj, filter, drawctx, l, r, t, b, do_async);
328 if (!ok) ERR("Filter input render failed."); 326 if (!ok) ERR("Filter input render failed.");
329 327
330 ENFN->context_free(ENDT, drawctx); 328 ENFN->context_free(ENDT, drawctx);
@@ -333,8 +331,7 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
333 if (do_async && !pd->has_cb) 331 if (do_async && !pd->has_cb)
334 { 332 {
335 Evas *e = obj->layer->evas->evas; 333 Evas *e = obj->layer->evas->evas;
336 eo_do(e, eo_event_callback_add(EVAS_CANVAS_EVENT_RENDER_POST, 334 eo_event_callback_add(e, EVAS_CANVAS_EVENT_RENDER_POST, _render_post_cb, eo_obj);
337 _render_post_cb, eo_obj));
338 pd->has_cb = EINA_TRUE; 335 pd->has_cb = EINA_TRUE;
339 } 336 }
340 evas_filter_context_post_run_callback_set(filter, _filter_cb, eo_obj); 337 evas_filter_context_post_run_callback_set(filter, _filter_cb, eo_obj);
@@ -382,7 +379,7 @@ _evas_filter_efl_gfx_filter_filter_program_set(Eo *eo_obj, Evas_Filter_Data *pd,
382 eina_stringshare_replace(&fcow->name, name); 379 eina_stringshare_replace(&fcow->name, name);
383 if (code) 380 if (code)
384 { 381 {
385 eo_do(eo_obj, alpha = evas_filter_input_alpha()); 382 alpha = evas_filter_input_alpha(eo_obj);
386 pgm = evas_filter_program_new(fcow->name, alpha); 383 pgm = evas_filter_program_new(fcow->name, alpha);
387 evas_filter_program_source_set_all(pgm, fcow->sources); 384 evas_filter_program_source_set_all(pgm, fcow->sources);
388 evas_filter_program_data_set_all(pgm, fcow->data); 385 evas_filter_program_data_set_all(pgm, fcow->data);
@@ -405,7 +402,7 @@ _evas_filter_efl_gfx_filter_filter_program_set(Eo *eo_obj, Evas_Filter_Data *pd,
405 FCOW_END(fcow, pd); 402 FCOW_END(fcow, pd);
406 403
407 // Update object 404 // Update object
408 eo_do(eo_obj, evas_filter_dirty()); 405 evas_filter_dirty(eo_obj);
409 evas_object_change(eo_obj, obj); 406 evas_object_change(eo_obj, obj);
410 evas_object_clip_dirty(eo_obj, obj); 407 evas_object_clip_dirty(eo_obj, obj);
411 evas_object_coords_recalc(eo_obj, obj); 408 evas_object_coords_recalc(eo_obj, obj);
@@ -499,7 +496,7 @@ update:
499 FCOW_END(fcow, pd); 496 FCOW_END(fcow, pd);
500 } 497 }
501 498
502 eo_do(eo_obj, evas_filter_dirty()); 499 evas_filter_dirty(eo_obj);
503 evas_object_change(eo_obj, obj); 500 evas_object_change(eo_obj, obj);
504 evas_object_clip_dirty(eo_obj, obj); 501 evas_object_clip_dirty(eo_obj, obj);
505 evas_object_coords_recalc(eo_obj, obj); 502 evas_object_coords_recalc(eo_obj, obj);
@@ -546,7 +543,7 @@ _evas_filter_efl_gfx_filter_filter_state_set(Eo *eo_obj, Evas_Filter_Data *pd,
546 } 543 }
547 544
548 // Mark as changed 545 // Mark as changed
549 eo_do(eo_obj, evas_filter_dirty()); 546 evas_filter_dirty(eo_obj);
550 evas_object_change(eo_obj, obj); 547 evas_object_change(eo_obj, obj);
551 evas_object_clip_dirty(eo_obj, obj); 548 evas_object_clip_dirty(eo_obj, obj);
552 evas_object_coords_recalc(eo_obj, obj); 549 evas_object_coords_recalc(eo_obj, obj);
@@ -609,7 +606,7 @@ _evas_filter_eo_base_constructor(Eo *eo_obj, Evas_Filter_Data *pd)
609{ 606{
610 Eo *obj = NULL; 607 Eo *obj = NULL;
611 608
612 eo_do_super(eo_obj, MY_CLASS, obj = eo_constructor()); 609 obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
613 pd->data = eina_cow_alloc(evas_object_filter_cow); 610 pd->data = eina_cow_alloc(evas_object_filter_cow);
614 SLKI(pd->lck); 611 SLKI(pd->lck);
615 612
@@ -650,12 +647,11 @@ finish:
650 if (pd->has_cb) 647 if (pd->has_cb)
651 { 648 {
652 Evas *e = obj->layer->evas->evas; 649 Evas *e = obj->layer->evas->evas;
653 eo_do(e, eo_event_callback_del(EVAS_CANVAS_EVENT_RENDER_POST, 650 eo_event_callback_del(e, EVAS_CANVAS_EVENT_RENDER_POST, _render_post_cb, eo_obj);
654 _render_post_cb, eo_obj));
655 } 651 }
656 SLKD(pd->lck); 652 SLKD(pd->lck);
657 653
658 eo_do_super(eo_obj, MY_CLASS, eo_destructor()); 654 eo_destructor(eo_super(eo_obj, MY_CLASS));
659} 655}
660 656
661EOLIAN static void 657EOLIAN static void