summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-06-04 20:23:13 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-06-04 20:23:13 +0100
commit8cfc0ec41beded13890224352d85c5731500b129 (patch)
tree0f14b0ef5d09ef82f581c1c6199941c7b26c5687 /src/lib
parent6e460922bb0b0d257b5f328229e53ab6c57c1a85 (diff)
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
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/evas/canvas/evas_render.c29
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,
3277 EVAS_RENDER_MODE_SYNC : 3277 EVAS_RENDER_MODE_SYNC :
3278 EVAS_RENDER_MODE_ASYNC_INIT; 3278 EVAS_RENDER_MODE_ASYNC_INIT;
3279 Eina_Bool haveup = EINA_FALSE; 3279 Eina_Bool haveup = EINA_FALSE;
3280 static int show_update_boxes = -1;
3280 3281
3281 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); 3282 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
3282 return EINA_FALSE; 3283 return EINA_FALSE;
@@ -3304,6 +3305,11 @@ evas_render_updates_internal(Evas *eo_e,
3304 double start_time = _time_get(); 3305 double start_time = _time_get();
3305#endif 3306#endif
3306 3307
3308 if (show_update_boxes == -1)
3309 {
3310 if (getenv("EVAS_RENDER_DEBUG_UPDATE_BOXES")) show_update_boxes = 1;
3311 else show_update_boxes = 0;
3312 }
3307 evas_render_pre(eo_e, evas); 3313 evas_render_pre(eo_e, evas);
3308 3314
3309 _evas_planes(e); 3315 _evas_planes(e);
@@ -3610,6 +3616,29 @@ evas_render_updates_internal(Evas *eo_e,
3610 eina_evlog("-render_update", eo_e, 0.0, NULL); 3616 eina_evlog("-render_update", eo_e, 0.0, NULL);
3611 if (!do_async) 3617 if (!do_async)
3612 { 3618 {
3619 if (show_update_boxes == 1)
3620 {
3621 static int fn = 0;
3622 void *ctx;
3623
3624 fn++;
3625 ctx = ENFN->context_new(ENC);
3626 ENFN->context_color_set
3627 (ENC, ctx, fn & 0xff, 0x40, 0x20, 0xff);
3628 ENFN->rectangle_draw(ENC, out->output,
3629 ctx, surface,
3630 ux - out->geometry.x, uy - out->geometry.y, uw, 1, do_async);
3631 ENFN->rectangle_draw(ENC, out->output,
3632 ctx, surface,
3633 ux - out->geometry.x, uy - out->geometry.y + uh - 1, uw, 1, do_async);
3634 ENFN->rectangle_draw(ENC, out->output,
3635 ctx, surface,
3636 ux - out->geometry.x, uy - out->geometry.y, 1, uh, do_async);
3637 ENFN->rectangle_draw(ENC, out->output,
3638 ctx, surface,
3639 ux - out->geometry.x + uw - 1, uy - out->geometry.y, 1, uh, do_async);
3640 ENFN->context_free(ENC, ctx);
3641 }
3613 eina_evlog("+render_push", eo_e, 0.0, NULL); 3642 eina_evlog("+render_push", eo_e, 0.0, NULL);
3614 ENFN->output_redraws_next_update_push(ENC, out->output, surface, 3643 ENFN->output_redraws_next_update_push(ENC, out->output, surface,
3615 ux - out->geometry.x, uy - out->geometry.y, uw, uh, 3644 ux - out->geometry.x, uy - out->geometry.y, uw, uh,