jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b640cb5ba9af16533a6625140c4e5e8a79ad7f01

commit b640cb5ba9af16533a6625140c4e5e8a79ad7f01
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Wed Mar 2 14:41:32 2016 +0900

    Evas filters: Simplify evas_filter_dirty
    
    Objects can mark themselves as changed rather than having all this
    duplicated code inside the mixin.
---
 src/lib/evas/canvas/evas_filter_mixin.c | 24 ------------------------
 src/lib/evas/canvas/evas_object_image.c |  5 ++++-
 src/lib/evas/canvas/evas_object_text.c  |  3 +++
 3 files changed, 7 insertions(+), 25 deletions(-)

diff --git a/src/lib/evas/canvas/evas_filter_mixin.c 
b/src/lib/evas/canvas/evas_filter_mixin.c
index 4d4b7ca..6461776 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -56,10 +56,6 @@ _filter_end_sync(Evas_Filter_Context *ctx, 
Evas_Object_Protected_Data *obj,
         ERR("Filter failed at runtime!");
         evas_filter_invalid_set(eo_obj, EINA_TRUE);
         evas_filter_dirty(eo_obj);
-        evas_object_change(eo_obj, obj);
-        evas_object_clip_dirty(eo_obj, obj);
-        evas_object_coords_recalc(eo_obj, obj);
-        evas_object_inform_call_resize(eo_obj);
      }
    else
      {
@@ -401,12 +397,7 @@ _evas_filter_efl_gfx_filter_filter_program_set(Eo *eo_obj, 
Evas_Filter_Data *pd,
      }
    FCOW_END(fcow, pd);
 
-   // Update object
    evas_filter_dirty(eo_obj);
-   evas_object_change(eo_obj, obj);
-   evas_object_clip_dirty(eo_obj, obj);
-   evas_object_coords_recalc(eo_obj, obj);
-   evas_object_inform_call_resize(eo_obj);
 }
 
 EOLIAN static void
@@ -497,10 +488,6 @@ update:
      }
 
    evas_filter_dirty(eo_obj);
-   evas_object_change(eo_obj, obj);
-   evas_object_clip_dirty(eo_obj, obj);
-   evas_object_coords_recalc(eo_obj, obj);
-   evas_object_inform_call_resize(eo_obj);
 }
 
 EOLIAN static Efl_Gfx_Base *
@@ -542,12 +529,7 @@ _evas_filter_efl_gfx_filter_filter_state_set(Eo *eo_obj, 
Evas_Filter_Data *pd,
                                            pd->data->state.pos);
           }
 
-        // Mark as changed
         evas_filter_dirty(eo_obj);
-        evas_object_change(eo_obj, obj);
-        evas_object_clip_dirty(eo_obj, obj);
-        evas_object_coords_recalc(eo_obj, obj);
-        evas_object_inform_call_resize(eo_obj);
      }
 }
 
@@ -659,7 +641,6 @@ _evas_filter_efl_gfx_filter_filter_data_set(Eo *eo_obj, 
Evas_Filter_Data *pd,
                                             const char *name, const char 
*value,
                                             Eina_Bool execute)
 {
-   Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
    Evas_Filter_Data_Binding *db, *found = NULL;
    Evas_Object_Filter_Data *fcow;
 
@@ -701,12 +682,7 @@ _evas_filter_efl_gfx_filter_filter_data_set(Eo *eo_obj, 
Evas_Filter_Data *pd,
      }
    FCOW_END(fcow, pd);
 
-   // update object
    evas_filter_dirty(eo_obj);
-   evas_object_change(eo_obj, obj);
-   evas_object_clip_dirty(eo_obj, obj);
-   evas_object_coords_recalc(eo_obj, obj);
-   evas_object_inform_call_resize(eo_obj);
 }
 
 EOLIAN static void
diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index f3b1d77..8fd8c94 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -3206,9 +3206,12 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj,
 }
 
 EOLIAN static void
-_evas_image_evas_filter_filter_dirty(Eo *eo_obj EINA_UNUSED, Evas_Image_Data 
*o)
+_evas_image_evas_filter_filter_dirty(Eo *eo_obj, Evas_Image_Data *o)
 {
+   Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
+
    o->changed = 1;
+   evas_object_change(eo_obj, obj);
 }
 
 EOLIAN static Eina_Bool
diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index a492ebd..186200e 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -1665,8 +1665,11 @@ evas_font_draw_async_check(Evas_Object_Protected_Data 
*obj,
 EOLIAN static void
 _evas_text_evas_filter_filter_dirty(Eo *eo_obj, Evas_Text_Data *o)
 {
+   Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
+
    _evas_object_text_items_clear(o);
    o->changed = 1;
+   evas_object_change(eo_obj, obj);
    _evas_object_text_recalc(eo_obj, o->cur.text);
 }
 

-- 


Reply via email to