RHI: fix incorrect swapchain resize on high DPI screens


We were comparing the size of the swapchain to QWindow::size() *
QWindow::devicePixelRatio() to decide whether to resize the swapchain.
This may not always match the size of the swapchain: see for instance
the implementation of QGles2SwapChain::surfacePixelSize.

It's better to use QRhiSwapchain::surfacePixelSize instead.

Pick-to: 6.12 6.11 6.8
Fixes: QTBUG-148251
Fixes: QTBUG-142683
Change-Id: I5995e68b99cf0e71082cd68e16333b2d76ca0c88
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
commit5e71f1e4cdbe9a2e03eaa53a01b9550a91d12b84
parent0d64718b3a299281134da3059db6101498e20140
authorMauro Persano <mauro.persano@kdab.com>
committerMauro Persano <mauro.persano@kdab.com>
commit timeTue, 14 Jul 2026 11:36:29 +0000