summaryrefslogtreecommitdiff
path: root/overlay
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-22 22:50:05 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-22 22:53:00 +0100
commitea80196d9f9380bb7ede871553db2b329a6a2713 (patch)
tree9f8bd2ac6ed76d3082740318bcec99a55ffa6ea6 /overlay
parent163b6a52a4dd44c48c40a609aa8b8b1ffc46881e (diff)
overlay: Replace debug ticker with hostname
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay')
-rw-r--r--overlay/overlay.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/overlay/overlay.c b/overlay/overlay.c
index c6234bf4..c99f58b0 100644
--- a/overlay/overlay.c
+++ b/overlay/overlay.c
@@ -769,23 +769,24 @@ int main(int argc, char **argv)
cairo_paint(ctx.cr);
cairo_set_operator(ctx.cr, CAIRO_OPERATOR_OVER);
+ show_gpu_top(&ctx, &ctx.gpu_top);
+ show_gpu_perf(&ctx, &ctx.gpu_perf);
+ show_gpu_freq(&ctx, &ctx.gpu_freq);
+ show_gem_objects(&ctx, &ctx.gem_objects);
+
{
char buf[80];
cairo_text_extents_t extents;
- sprintf(buf, "%d", i++);
+ gethostname(buf, sizeof(buf));
cairo_set_source_rgb(ctx.cr, .5, .5, .5);
+ cairo_set_font_size(ctx.cr, 10);
cairo_text_extents(ctx.cr, buf, &extents);
cairo_move_to(ctx.cr,
- ctx.width-extents.width-6,
- 6+extents.height);
+ (ctx.width-extents.width)/2.,
+ 1+extents.height);
cairo_show_text(ctx.cr, buf);
}
- show_gpu_top(&ctx, &ctx.gpu_top);
- show_gpu_perf(&ctx, &ctx.gpu_perf);
- show_gpu_freq(&ctx, &ctx.gpu_freq);
- show_gem_objects(&ctx, &ctx.gem_objects);
-
cairo_destroy(ctx.cr);
overlay_show(ctx.surface);