Android: retire suspended surfaces on the GUI thread


The dispatcher stop flag records a stop request, not proof
that the GUI thread and renderer are parked. Releasing a
surface directly on the Android UI thread can therefore race
rendering and bypass surface invalidation and exposure
notifications.

Queue retirement through the GUI-thread destruction handler
even while suspended. Retain the producer until that handler
runs after resume, preserving ordered notifications without
blocking the Android UI thread.

Pick-to: 6.12
Fixes: QTBUG-139004
Change-Id: Ice0da67be0c33c5d770aa21c8d9322fab930d743
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
commit16d7e0722806fdf2edba186d32bb1bb02cec0357
parent8fd8537760d0fd3c61a44b672f9609adb2d76472
authorAssam Boudjelthia <assam.boudjelthia@qt.io>
committerAssam Boudjelthia <assam.boudjelthia@qt.io>
commit timeWed, 21 Oct 2026 22:18:48 +0000