Fixed: correct a mistake in CanvasRenderer when the canvas element's size has changed.

Correct a mistake in CanvasRenderer when the canvas element's size has changed.