From 00282ed4589491732e921b66166ffa72e3ae11f3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 19 Aug 2013 23:29:08 +0100 Subject: overlay: Wrap the colour index around the rgba array And stop assigning colours beyond the end of the array. Still needs a better method for colour assignment, big list of good colours & ida? Signed-off-by: Chris Wilson --- overlay/overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'overlay/overlay.c') diff --git a/overlay/overlay.c b/overlay/overlay.c index 070cd04e..fbec7e8c 100644 --- a/overlay/overlay.c +++ b/overlay/overlay.c @@ -263,7 +263,7 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf * rgba[last_color][1], rgba[last_color][2], rgba[last_color][3]); - last_color++; + last_color = (last_color + 1) % 4; chart_set_stroke_width(comm->user_data, 1); } -- cgit v1.2.3