summaryrefslogtreecommitdiff
path: root/overlay/overlay.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-19 08:20:15 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-19 08:20:15 +0100
commit3df8300e23a6a610f738722872743b0670298f99 (patch)
treefc1fb54a770bddf9b22e5c1ebf9fefbf15839a17 /overlay/overlay.c
parent34e4780c8e9c429a835c8be9c512cfe239241298 (diff)
overlay: Tweak label locations to include baseline offset.
Still approximately, too lazy to query the metrics. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/overlay.c')
-rw-r--r--overlay/overlay.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/overlay/overlay.c b/overlay/overlay.c
index b9247b84..6fb2bc26 100644
--- a/overlay/overlay.c
+++ b/overlay/overlay.c
@@ -165,7 +165,7 @@ static void show_gpu_top(struct overlay_context *ctx, struct overlay_gpu_top *gt
cairo_set_source_rgb(ctx->cr, 1, 1, 1);
- y = 12;
+ y = 12 + 12 - 2;
cairo_set_source_rgba(ctx->cr, 0.75, 0.25, 0.75, 1.);
cairo_move_to(ctx->cr, 12, y);
sprintf(txt, "CPU: %d%% busy", gt->cpu_top.busy);
@@ -242,7 +242,7 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
gpu_perf_update(&gp->gpu_perf);
- y = 12;
+ y = 12 + 12 - 2;
x = ctx->width/2 + 12;
for (comm = gp->gpu_perf.comm; comm; comm = comm->next) {
@@ -423,7 +423,7 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq *
chart_draw(&gf->request, ctx->cr);
chart_draw(&gf->current, ctx->cr);
- y = ctx->height/2 + 6;
+ y = ctx->height/2 + 6 + 12 - 2;
len = sprintf(buf, "Frequency: %dMHz", gf->gpu_freq.current);
if (gf->gpu_freq.request)
sprintf(buf + len, " (requested %dMHz)", gf->gpu_freq.request);
@@ -477,7 +477,7 @@ static void show_gem_objects(struct overlay_context *ctx, struct overlay_gem_obj
chart_draw(&go->gtt, ctx->cr);
chart_draw(&go->aperture, ctx->cr);
- y = ctx->height/2 + 6;
+ y = ctx->height/2 + 6 + 12 - 2;
x = ctx->width/2 + 12;
sprintf(buf, "Total: %ldMB, %d objects",
go->gem_objects.total_bytes >> 20, go->gem_objects.total_count);