diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-02-20 23:14:38 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-02-21 11:23:07 +0900 |
commit | a55e0ced2604777c97521dddcf09b0421c6ea504 (patch) | |
tree | 77ec252a6fd58c9763786b15b7468056f56fc74f /src/lib | |
parent | cbb804f814915a74c3fd4dcc84e8dd6c66ec9b9f (diff) |
evas: Inline part of clip_dirty
clip_dirty is called A LOT. Unfortunately this patch does not
result in very measurable improvements.
**********************
Note about this merge:
After this series of patches, the CPU usage for a certain test
case has significantly gone down:
Based on c0e6a8d698c17fc16f9b67fc9 (upstream before git push):
NS since frame 2 = 28910806786 , 2937 frames = 9843652 / frame
After this patch:
NS since frame 2 = 19218592951 , 2928 frames = 6563727 / frame
1.18:
NS since 2 = 13105584220 , 2961 frames = 4426066 / frame
As we can see, 1.18 remains *much* better than 1.19. I'm still
struggling trying to figure out why (clip_recalc is called more,
but the call tree is hard to decypher).
The test case is:
EINA_FREEQ_BYPASS=1 ELM_TEST_AUTOBOUNCE=100 \
elementary_test -to "Scroller 2"
EFL was compiled with GCC 6.3.1 with -O3 -g
@optimization
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/evas/canvas/evas_clip.c | 4 | ||||
-rw-r--r-- | src/lib/evas/include/evas_inline.x | 7 | ||||
-rw-r--r-- | src/lib/evas/include/evas_private.h | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c index da761c3a64..6d9f267577 100644 --- a/src/lib/evas/canvas/evas_clip.c +++ b/src/lib/evas/canvas/evas_clip.c | |||
@@ -4,13 +4,11 @@ | |||
4 | static void _clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj); | 4 | static void _clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj); |
5 | 5 | ||
6 | void | 6 | void |
7 | evas_object_clip_dirty(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) | 7 | evas_object_clip_dirty_do(Evas_Object_Protected_Data *obj) |
8 | { | 8 | { |
9 | Evas_Object_Protected_Data *clipee; | 9 | Evas_Object_Protected_Data *clipee; |
10 | Eina_List *l; | 10 | Eina_List *l; |
11 | 11 | ||
12 | if (obj->cur->cache.clip.dirty) return; | ||
13 | |||
14 | EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) | 12 | EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) |
15 | { | 13 | { |
16 | state_write->cache.clip.dirty = EINA_TRUE; | 14 | state_write->cache.clip.dirty = EINA_TRUE; |
diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x index ec53d6d388..979f6ef088 100644 --- a/src/lib/evas/include/evas_inline.x +++ b/src/lib/evas/include/evas_inline.x | |||
@@ -289,6 +289,13 @@ evas_object_clip_recalc(Evas_Object_Protected_Data *obj) | |||
289 | } | 289 | } |
290 | 290 | ||
291 | static inline void | 291 | static inline void |
292 | evas_object_clip_dirty(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) | ||
293 | { | ||
294 | if (obj->cur->cache.clip.dirty) return; | ||
295 | evas_object_clip_dirty_do(obj); | ||
296 | } | ||
297 | |||
298 | static inline void | ||
292 | evas_object_async_block(Evas_Object_Protected_Data *obj) | 299 | evas_object_async_block(Evas_Object_Protected_Data *obj) |
293 | { | 300 | { |
294 | if (EVAS_OBJECT_DATA_VALID(obj)) | 301 | if (EVAS_OBJECT_DATA_VALID(obj)) |
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 356f3bef8c..eb9a1a0785 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h | |||
@@ -1615,7 +1615,7 @@ void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, | |||
1615 | void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh); | 1615 | void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh); |
1616 | Evas_Object_Pointer_Data *_evas_object_pointer_data_get(Evas_Pointer_Data *evas_pdata, Evas_Object_Protected_Data *obj); | 1616 | Evas_Object_Pointer_Data *_evas_object_pointer_data_get(Evas_Pointer_Data *evas_pdata, Evas_Object_Protected_Data *obj); |
1617 | 1617 | ||
1618 | void evas_object_clip_dirty(Evas_Object *obj, Evas_Object_Protected_Data *pd); | 1618 | void evas_object_clip_dirty_do(Evas_Object_Protected_Data *pd); |
1619 | void evas_object_recalc_clippees(Evas_Object_Protected_Data *pd); | 1619 | void evas_object_recalc_clippees(Evas_Object_Protected_Data *pd); |
1620 | Evas_Layer *evas_layer_new(Evas *e); | 1620 | Evas_Layer *evas_layer_new(Evas *e); |
1621 | void _evas_layer_flush_removes(Evas_Layer *lay); | 1621 | void _evas_layer_flush_removes(Evas_Layer *lay); |