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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-08-19 23:29:08 +01:00
parent f71d7aeb77
commit 00282ed458

View File

@ -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);
}