diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-06-04 20:23:13 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-06-04 20:23:13 +0100 |
commit | 8cfc0ec41beded13890224352d85c5731500b129 (patch) | |
tree | 0f14b0ef5d09ef82f581c1c6199941c7b26c5687 | |
parent | 6e460922bb0b0d257b5f328229e53ab6c57c1a85 (diff) | |
download | efl-8cfc0ec41beded13890224352d85c5731500b129.tar.gz |
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
-rw-r--r-- | src/lib/evas/canvas/evas_render.c | 29 |
1 files changed, 29 insertions, 0 deletions
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, |