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
This commit is contained in:
Jean-Philippe Andre 2017-02-20 23:14:38 +09:00
parent cbb804f814
commit a55e0ced26
3 changed files with 9 additions and 4 deletions

View File

@ -4,13 +4,11 @@
static void _clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj);
void
evas_object_clip_dirty(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
evas_object_clip_dirty_do(Evas_Object_Protected_Data *obj)
{
Evas_Object_Protected_Data *clipee;
Eina_List *l;
if (obj->cur->cache.clip.dirty) return;
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->cache.clip.dirty = EINA_TRUE;

View File

@ -288,6 +288,13 @@ evas_object_clip_recalc(Evas_Object_Protected_Data *obj)
evas_object_clip_recalc_do(obj, clipper);
}
static inline void
evas_object_clip_dirty(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
{
if (obj->cur->cache.clip.dirty) return;
evas_object_clip_dirty_do(obj);
}
static inline void
evas_object_async_block(Evas_Object_Protected_Data *obj)
{

View File

@ -1615,7 +1615,7 @@ void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj,
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);
Evas_Object_Pointer_Data *_evas_object_pointer_data_get(Evas_Pointer_Data *evas_pdata, Evas_Object_Protected_Data *obj);
void evas_object_clip_dirty(Evas_Object *obj, Evas_Object_Protected_Data *pd);
void evas_object_clip_dirty_do(Evas_Object_Protected_Data *pd);
void evas_object_recalc_clippees(Evas_Object_Protected_Data *pd);
Evas_Layer *evas_layer_new(Evas *e);
void _evas_layer_flush_removes(Evas_Layer *lay);