summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2025-08-24 02:57:01 +0300
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2025-08-27 14:57:46 +0300
commitb25c1e8452ecffa70b4b75fdb579f08187b36a63 (patch)
tree8fc361a9a19f9f5a4481cd1d6533024c4b6511a5 /src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
parent1678e8ac463d189db416f41bd0680ce5954529d4 (diff)
Android: split and rename checkNativeSurface()
This function is doing more than what's obvious from the name, it checks if the surface has been created and creates the egl surface and then calls sendExpose(). This splits and renamed to one call for checking if the surface, then sendExpose() is moved to the existing createEgl(). Pick-to: 6.10 Change-Id: Ie15123324fca68df4a66c386916f13d691ac66c6 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformopenglcontext.cpp')
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglcontext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
index 00b2af18b3a..a6cc706785e 100644
--- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
+++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
@@ -34,7 +34,8 @@ void QAndroidPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface)
// by Android
window->lockSurface();
- if (window->checkNativeSurface(eglConfig())) {
+ if (window->makeCurrentNeeded()) {
+ window->createEgl(eglConfig());
// Call base class implementation directly since we are already locked
QEGLPlatformContext::makeCurrent(surface);
}