Get output width and height.
Redraw only when input changed.