jpeg pushed a commit to branch master.

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

commit 98092224ef6265f27cc6b8fd58da8ce8cf9850d3
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Mon Feb 20 18:26:40 2017 +0900

    evas: Avoid more calls to efl_isa in clip_set
    
    No need to verify that the clip is an evas object unless we're
    actually going to change said clipper. This has a minor effect,
    removing ~10% of all calls to efl_isa (0.1% of everything).
    
    After all those efl_isa patches the number of calls has dropped
    from 1.9M (~3.05%) to ~570k (0.76%). More can still be done,
    surely. Now efl_isa accounts for ~0.05% of my CPU usage according
    to perf top (down from ~0.7%).
    
    If edje uses EO APIs instead of legacy image APIs, then many of
    the remaining calls will vanish.
    
    @optimization
---
 src/lib/evas/canvas/evas_clip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c
index 494e13d..da761c3 100644
--- a/src/lib/evas/canvas/evas_clip.c
+++ b/src/lib/evas/canvas/evas_clip.c
@@ -324,6 +324,9 @@ _efl_canvas_object_clip_set(Eo *eo_obj, 
Evas_Object_Protected_Data *obj, Evas_Ob
 
    EVAS_OBJECT_DATA_ALIVE_CHECK(obj);
 
+   if ((!obj->cur->clipper && !eo_clip) ||
+       (obj->cur->clipper && obj->cur->clipper->object == eo_clip)) return;
+
    clip = EVAS_OBJECT_DATA_SAFE_GET(eo_clip);
    if (!EVAS_OBJECT_DATA_ALIVE(clip))
      {

-- 


Reply via email to