Avoid unnecessary repaints (#40)

Use the last render time and the scroll speed to work out whether we actually need to paint anything yet. If not, we can avoid a full repaint and return immediately.

Thanks to Bai Yang (@asbai) for the initial version of this patch.