diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-04-10 10:57:18 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-04-15 00:41:58 +0000 |
commit | a40850f0c165045fd037ff945b00b643031700a9 (patch) | |
tree | b9cb7ce294a3f6aff5b0042ea03bebf37ba62240 | |
parent | 4b30d82f05064723b9c3684e1c16ae0cf9d71baa (diff) |
Move check for g_egl_surfaceless_context_supportedv5.11.0-beta4
The check g_egl_surfaceless_context_supported can not take place in
InitializeExtensionSettingsOneOff since correct surface/less
initialization is required for gpu info collection which
is initialized with InitializeGLNoExtensionsOneOff. Otherwise
egl with pbuffers is only supported, which will fail on wayland.
Move the check to InitializeOneOff.
Task-number: QTBUG-65682
Change-Id: I0f5107134366f141e1941e824e3238473383962a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | src/core/ozone/gl_surface_egl_qt.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/core/ozone/gl_surface_egl_qt.cpp b/src/core/ozone/gl_surface_egl_qt.cpp index 0f21b8dfe..e4dc738aa 100644 --- a/src/core/ozone/gl_surface_egl_qt.cpp +++ b/src/core/ozone/gl_surface_egl_qt.cpp @@ -89,15 +89,6 @@ bool GLSurfaceEGLQt::InitializeOneOff() return false; } - s_initialized = true; - return true; -} - -bool GLSurfaceEGLQt::InitializeExtensionSettingsOneOff() -{ - if (!s_initialized) - return false; - g_extensions = eglQueryString(g_display, EGL_EXTENSIONS); g_egl_surfaceless_context_supported = ExtensionsContain(g_extensions, "EGL_KHR_surfaceless_context"); if (g_egl_surfaceless_context_supported) { @@ -116,10 +107,15 @@ bool GLSurfaceEGLQt::InitializeExtensionSettingsOneOff() context->ReleaseCurrent(surface.get()); } } - + s_initialized = true; return true; } +bool GLSurfaceEGLQt::InitializeExtensionSettingsOneOff() +{ + return s_initialized; +} + bool GLSurfaceEGL::InitializeExtensionSettingsOneOff() { return GLSurfaceEGLQt::InitializeExtensionSettingsOneOff(); |