tests: Return an owning struct from createOffscreenGlRhi


Passing the QOffscreenSurface as an out-parameter obscured that it's
part of the function's result, not an input. Return an aggregate
instead, so the QRhi and the surface that keeps it alive travel
together and the destruction order between them is enforced by the
struct itself rather than by caller-side declaration order.

Pick-to: 6.12
Change-Id: Ia8d3831e12f2c12156c0566bfc8fdd7537e86a44
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
commit0598f33ec6ed3f4fb05f48af27f8f01afe743c24
parent5a7caf4440919abee91074c2408aa8bd8b68ce6a
authorTim Blechmann <tim.blechmann@qt.io>
committerTim Blechmann <tim.blechmann@qt.io>
commit timeTue, 29 Sep 2026 13:46:24 +0000