raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8cfc0ec41beded13890224352d85c5731500b129
commit 8cfc0ec41beded13890224352d85c5731500b129 Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Thu Jun 4 20:23:13 2020 +0100 evas render - add debug to draw boxes around update regions helps debug update regions to see if there is too much overdraw or too many regions. i smelled too manhy and this showed it. i was right. fix for too many regions coming next --- src/lib/evas/canvas/evas_render.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index f80cb24c8d..c33f69a22d 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -3277,6 +3277,7 @@ evas_render_updates_internal(Evas *eo_e, EVAS_RENDER_MODE_SYNC : EVAS_RENDER_MODE_ASYNC_INIT; Eina_Bool haveup = EINA_FALSE; + static int show_update_boxes = -1; MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); return EINA_FALSE; @@ -3304,6 +3305,11 @@ evas_render_updates_internal(Evas *eo_e, double start_time = _time_get(); #endif + if (show_update_boxes == -1) + { + if (getenv("EVAS_RENDER_DEBUG_UPDATE_BOXES")) show_update_boxes = 1; + else show_update_boxes = 0; + } evas_render_pre(eo_e, evas); _evas_planes(e); @@ -3610,6 +3616,29 @@ evas_render_updates_internal(Evas *eo_e, eina_evlog("-render_update", eo_e, 0.0, NULL); if (!do_async) { + if (show_update_boxes == 1) + { + static int fn = 0; + void *ctx; + + fn++; + ctx = ENFN->context_new(ENC); + ENFN->context_color_set + (ENC, ctx, fn & 0xff, 0x40, 0x20, 0xff); + ENFN->rectangle_draw(ENC, out->output, + ctx, surface, + ux - out->geometry.x, uy - out->geometry.y, uw, 1, do_async); + ENFN->rectangle_draw(ENC, out->output, + ctx, surface, + ux - out->geometry.x, uy - out->geometry.y + uh - 1, uw, 1, do_async); + ENFN->rectangle_draw(ENC, out->output, + ctx, surface, + ux - out->geometry.x, uy - out->geometry.y, 1, uh, do_async); + ENFN->rectangle_draw(ENC, out->output, + ctx, surface, + ux - out->geometry.x + uw - 1, uy - out->geometry.y, 1, uh, do_async); + ENFN->context_free(ENC, ctx); + } eina_evlog("+render_push", eo_e, 0.0, NULL); ENFN->output_redraws_next_update_push(ENC, out->output, surface, ux - out->geometry.x, uy - out->geometry.y, uw, uh, --
