summaryrefslogtreecommitdiff
path: root/overlay/overlay.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-19 23:29:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-19 23:29:08 +0100
commit00282ed4589491732e921b66166ffa72e3ae11f3 (patch)
tree0cc690af349667ceee42c5e8542bf3974c023bb3 /overlay/overlay.c
parentf71d7aeb774ea8d603519d0d1fdef69ba83f2b68 (diff)
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>
Diffstat (limited to 'overlay/overlay.c')
-rw-r--r--overlay/overlay.c2
1 files changed, 1 insertions, 1 deletions
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);
}