diff options
| author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2025-08-29 18:43:38 +0300 |
|---|---|---|
| committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2025-09-01 21:31:58 +0300 |
| commit | be19bdc7eff028aa5461d698de0b79fb4627526b (patch) | |
| tree | 7e61c5187db4d1134a39388c5a141f99a44eab29 | |
| parent | 9ddf467544fd91b72bb12b66e7a3dd80a2121c43 (diff) | |
Android: rename m_surfaceCreated to m_androidSurfaceCreated
This would make it clear that the boolean is tracking the Android
surface (QtSurface) and not the egl surface.
Pick-to: 6.10
Change-Id: Idd46940b9f18d7c489b0ed3ca8b64780f248bb76
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
4 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp b/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp index 152eb288666..bb6b720e111 100644 --- a/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp +++ b/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp @@ -57,7 +57,7 @@ EGLSurface QAndroidPlatformOpenGLWindow::eglSurface(EGLConfig config) } // If we haven't called createSurface() yet, call it and wait until Android has created // the Surface - if (!m_surfaceCreated) { + if (!m_androidSurfaceCreated) { static constexpr char funcName[] = "QAndroidPlatformOpenGLWindow::eglSurface()"; QtAndroidPrivate::AndroidDeadlockProtector protector(funcName); if (!protector.acquire()) { @@ -93,7 +93,7 @@ bool QAndroidPlatformOpenGLWindow::ensureEglSurfaceCreated(EGLConfig config) { // Either no surface created, or the m_eglSurface already wraps the active Surface, // so makeCurrent is NOT needed, and we should not create a new EGL surface. - if (!m_surfaceCreated || !m_androidSurfaceObject.isValid()) { + if (!m_androidSurfaceCreated || !m_androidSurfaceObject.isValid()) { qCDebug(lcQpaWindow) << "Skipping create egl on invalid or not yet created surface"; return false; } diff --git a/src/plugins/platforms/android/qandroidplatformvulkanwindow.cpp b/src/plugins/platforms/android/qandroidplatformvulkanwindow.cpp index 8025fb99fc6..01bba538675 100644 --- a/src/plugins/platforms/android/qandroidplatformvulkanwindow.cpp +++ b/src/plugins/platforms/android/qandroidplatformvulkanwindow.cpp @@ -92,7 +92,7 @@ VkSurfaceKHR *QAndroidPlatformVulkanWindow::vkSurface() clearSurface(); QMutexLocker lock(&m_surfaceMutex); - if (!m_surfaceCreated) { + if (!m_androidSurfaceCreated) { QtAndroidPrivate::AndroidDeadlockProtector protector( u"QAndroidPlatformVulkanWindow::vkSurface()"_s); if (!protector.acquire()) @@ -101,7 +101,7 @@ VkSurfaceKHR *QAndroidPlatformVulkanWindow::vkSurface() m_surfaceWaitCondition.wait(&m_surfaceMutex); } - if (!m_surfaceCreated || !m_androidSurfaceObject.isValid()) + if (!m_androidSurfaceCreated || !m_androidSurfaceObject.isValid()) return &m_vkSurface; QJniEnvironment env; diff --git a/src/plugins/platforms/android/qandroidplatformwindow.cpp b/src/plugins/platforms/android/qandroidplatformwindow.cpp index 41e4cbca2e3..d0baffa1735 100644 --- a/src/plugins/platforms/android/qandroidplatformwindow.cpp +++ b/src/plugins/platforms/android/qandroidplatformwindow.cpp @@ -313,14 +313,14 @@ void QAndroidPlatformWindow::createSurface() m_nativeQtWindow.callMethod<void>("createSurface", windowStaysOnTop, 32, isOpaque, m_surfaceContainerType); - m_surfaceCreated = true; + m_androidSurfaceCreated = true; } void QAndroidPlatformWindow::destroySurface() { - if (m_surfaceCreated) { + if (m_androidSurfaceCreated) { m_nativeQtWindow.callMethod<void>("destroySurface"); - m_surfaceCreated = false; + m_androidSurfaceCreated = false; } } @@ -378,7 +378,7 @@ void QAndroidPlatformWindow::setSurface(JNIEnv *env, jobject object, jint window QAndroidPlatformWindow *platformWindow = static_cast<QAndroidPlatformWindow *>(window->handle()); const auto guard = platformWindow->destructionGuard(); - if (!platformWindow->m_surfaceCreated) + if (!platformWindow->m_androidSurfaceCreated) continue; if (platformWindow->nativeViewId() == windowId) platformWindow->onSurfaceChanged(surface); diff --git a/src/plugins/platforms/android/qandroidplatformwindow.h b/src/plugins/platforms/android/qandroidplatformwindow.h index 81793cf8c9c..b3fc0960cad 100644 --- a/src/plugins/platforms/android/qandroidplatformwindow.h +++ b/src/plugins/platforms/android/qandroidplatformwindow.h @@ -97,7 +97,7 @@ protected: // destroy the Surface. QtJniTypes::Surface m_androidSurfaceObject; QWaitCondition m_surfaceWaitCondition; - bool m_surfaceCreated = false; + bool m_androidSurfaceCreated = false; QMutex m_surfaceMutex; QMutex m_destructionMutex; |
