Only re-draw the canvas when changes occur