update the viewport.