diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-21 13:36:29 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-21 13:36:51 +0100 |
commit | db35f8c6adfd3880910469beb5a55b0763e55fa4 (patch) | |
tree | 74dec394e2c21c5acf3b73314df505c76fc2baea /overlay | |
parent | e34fab5d2bad0ea9b6bb7e1eb45310640ccaf096 (diff) |
overlay: Put a faint outline around each chart
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay')
-rw-r--r-- | overlay/overlay.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/overlay/overlay.c b/overlay/overlay.c index 33d719b3..04ff5ee1 100644 --- a/overlay/overlay.c +++ b/overlay/overlay.c @@ -180,6 +180,11 @@ static void show_gpu_top(struct overlay_context *ctx, struct overlay_gpu_top *gt update = gpu_top_update(>->gpu_top); + cairo_rectangle(ctx->cr, 12-.5, 12-.5, ctx->width/2-18+1, ctx->height/2-18+1); + cairo_set_source_rgb(ctx->cr, .15, .15, .15); + cairo_set_line_width(ctx->cr, 1); + cairo_stroke(ctx->cr); + if (update && cpu_top_update(>->cpu_top) == 0) chart_add_sample(>->cpu, gt->cpu_top.busy); chart_draw(>->cpu, ctx->cr); @@ -287,7 +292,12 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf * gpu_perf_update(&gp->gpu_perf); y = 12 + 12 - 2; - x = ctx->width/2 + 12; + x = ctx->width/2 + 6; + + cairo_rectangle(ctx->cr, ctx->width/2+6-.5, 12-.5, ctx->width/2-18+1, ctx->height/2-18+1); + cairo_set_source_rgb(ctx->cr, .15, .15, .15); + cairo_set_line_width(ctx->cr, 1); + cairo_stroke(ctx->cr); for (comm = gp->gpu_perf.comm; comm; comm = comm->next) { int total; @@ -480,6 +490,11 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq * int has_power = power_update(&gf->power) == 0; cairo_pattern_t *linear; + cairo_rectangle(ctx->cr, 12-.5, ctx->height/2+6-.5, ctx->width/2-18+1, ctx->height/2-18+1); + cairo_set_source_rgb(ctx->cr, .15, .15, .15); + cairo_set_line_width(ctx->cr, 1); + cairo_stroke(ctx->cr); + if (has_freq) { if (gf->gpu_freq.current) chart_add_sample(&gf->current, gf->gpu_freq.current); @@ -611,6 +626,11 @@ static void show_gem_objects(struct overlay_context *ctx, struct overlay_gem_obj if (go->error) return; + cairo_rectangle(ctx->cr, ctx->width/2+6-.5, ctx->height/2+6-.5, ctx->width/2-18+1, ctx->height/2-18+1); + cairo_set_source_rgb(ctx->cr, .15, .15, .15); + cairo_set_line_width(ctx->cr, 1); + cairo_stroke(ctx->cr); + chart_add_sample(&go->gtt, go->gem_objects.total_gtt); chart_add_sample(&go->aperture, go->gem_objects.total_aperture); @@ -618,8 +638,8 @@ static void show_gem_objects(struct overlay_context *ctx, struct overlay_gem_obj chart_draw(&go->aperture, ctx->cr); - y = ctx->height/2 + 6 - 2; - x = ctx->width/2 + 12; + y = ctx->height/2 + 6 + 12 - 2; + x = ctx->width/2 + 6; y2 = y1 = y; y2 += 14; |