From f169d7ed2711a5cbab0a3511e5f082bd7142d225 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 5 Oct 2015 15:51:02 +0900 Subject: [PATCH] evas - cutouts - use less cpu by skipping non-intersecting cutout objs @feature --- src/lib/evas/canvas/evas_render.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 31b8635109..3fe93a0cf6 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -2328,10 +2328,21 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *e, obj2 = (Evas_Object_Protected_Data *)eina_array_data_get (&e->temporary_objects, j); - if (obj2 == top) break; - - _evas_render_cutout_add(e, context, obj2, off_x + fx, off_y + fy); +#if 1 + if ( + RECTS_INTERSECT + (obj->cur->cache.clip.x, obj->cur->cache.clip.y, + obj->cur->cache.clip.w, obj->cur->cache.clip.h, + obj2->cur->cache.clip.x, obj2->cur->cache.clip.y, + obj2->cur->cache.clip.w, obj2->cur->cache.clip.h) && + RECTS_INTERSECT + (obj2->cur->cache.clip.x, obj2->cur->cache.clip.y, + obj2->cur->cache.clip.w, obj2->cur->cache.clip.h, + ux, uy, uw, uh) + ) +#endif + _evas_render_cutout_add(e, context, obj2, off_x + fx, off_y + fy); } #endif clean_them |= evas_render_mapped(e, eo_obj, obj, context,