diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-09-13 09:23:54 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-18 10:19:16 +0000 |
commit | 37fcfd8166a960873781d8d9c9a8314ff896bbcd (patch) | |
tree | 78bf5f603a25be0b083f1141697ed20d9eafcbe5 | |
parent | eb35bcf72429aee2ac41606b7b1352e49e433626 (diff) |
Fix build when xcb only over egl/es2
Qt's xcb can be compiled without the glx support,
do not use Chromium flag to check that.
Fixes: QTBUG-96398
Change-Id: Ie7f1fe74699cd83aee1f9e5aff59760d4d7a70bf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 0fba07e0238a9ff0a1b496eae60ad92257ea76af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/core/ozone/gl_context_qt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp index 554977516..1dd7d8f6e 100644 --- a/src/core/ozone/gl_context_qt.cpp +++ b/src/core/ozone/gl_context_qt.cpp @@ -42,6 +42,7 @@ #include <QGuiApplication> #include <QOpenGLContext> #include <QThread> +#include <QtGui/private/qtgui-config_p.h> #include <qpa/qplatformnativeinterface.h> #include "ui/gl/gl_context_egl.h" #include "ui/gl/gl_implementation.h" @@ -154,7 +155,7 @@ void* GLContextHelper::getNativeDisplay() QFunctionPointer GLContextHelper::getGlXGetProcAddress() { QFunctionPointer get_proc_address = nullptr; -#if QT_CONFIG(opengl) +#if QT_CONFIG(xcb_glx) if (QOpenGLContext *context = qt_gl_global_share_context()) { get_proc_address = context->getProcAddress("glXGetProcAddress"); } @@ -175,7 +176,7 @@ QFunctionPointer GLContextHelper::getEglGetProcAddress() void *GLContextHelper::getGlxPlatformInterface() { -#if QT_CONFIG(opengl) && defined(USE_GLX) +#if QT_CONFIG(xcb_glx) if (QOpenGLContext *context = qt_gl_global_share_context()) return context->nativeInterface<QNativeInterface::QGLXContext>(); #endif |