5d5d3b7865
Extract the computation to detect whether the current size of the window is already optimal. This will allow to reuse it for rendering.