diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-02-20 18:26:40 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-02-21 10:52:40 +0900 |
commit | 98092224ef6265f27cc6b8fd58da8ce8cf9850d3 (patch) | |
tree | 1c682e5b7b42e920715445c8a6a1b15d4111d6bc /src/lib | |
parent | d150cdfd9d3ef32cceaf2db93a57f9b4a53aaf55 (diff) |
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
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/evas/canvas/evas_clip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c index 494e13d5d0..da761c3a64 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 | |||
324 | 324 | ||
325 | EVAS_OBJECT_DATA_ALIVE_CHECK(obj); | 325 | EVAS_OBJECT_DATA_ALIVE_CHECK(obj); |
326 | 326 | ||
327 | if ((!obj->cur->clipper && !eo_clip) || | ||
328 | (obj->cur->clipper && obj->cur->clipper->object == eo_clip)) return; | ||
329 | |||
327 | clip = EVAS_OBJECT_DATA_SAFE_GET(eo_clip); | 330 | clip = EVAS_OBJECT_DATA_SAFE_GET(eo_clip); |
328 | if (!EVAS_OBJECT_DATA_ALIVE(clip)) | 331 | if (!EVAS_OBJECT_DATA_ALIVE(clip)) |
329 | { | 332 | { |