Fixed an issue when the canvas height was exactly divisible by the texture
height.