diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-05-06 14:29:04 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-05-11 14:07:37 +0200 |
commit | 1f3ad386b11f84b65f70350099ac629d3cea8c9c (patch) | |
tree | c457ba6256f9832a7d441efe43479e7274140f4d /src/core/ozone | |
parent | 58cd21c0aa7a9dc5a18ea411dcf462a2ee8193f6 (diff) |
Switch away from QT_NO_OPENGL
Change-Id: I310265dacc9b1c8d391e82b6adf52b70c037d9b9
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/ozone')
-rw-r--r-- | src/core/ozone/gl_context_qt.cpp | 6 | ||||
-rw-r--r-- | src/core/ozone/gl_ozone_egl_qt.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp index e9337874a..10347bdc7 100644 --- a/src/core/ozone/gl_context_qt.cpp +++ b/src/core/ozone/gl_context_qt.cpp @@ -59,7 +59,7 @@ namespace { inline void *resourceForContext(const QByteArray &resource) { -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) QOpenGLContext *shareContext = qt_gl_global_share_context(); if (!shareContext) { qFatal("QWebEngine: OpenGL resource sharing is not set up in QtQuick. Please make sure to call QtWebEngine::initialize() in your main() function."); @@ -153,7 +153,7 @@ void* GLContextHelper::getNativeDisplay() QFunctionPointer GLContextHelper::getGlXGetProcAddress() { QFunctionPointer get_proc_address = nullptr; -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (QOpenGLContext *context = qt_gl_global_share_context()) { get_proc_address = context->getProcAddress("glXGetProcAddress"); } @@ -164,7 +164,7 @@ QFunctionPointer GLContextHelper::getGlXGetProcAddress() QFunctionPointer GLContextHelper::getEglGetProcAddress() { QFunctionPointer get_proc_address = nullptr; -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (QOpenGLContext *context = qt_gl_global_share_context()) { get_proc_address = context->getProcAddress("eglGetProcAddress"); } diff --git a/src/core/ozone/gl_ozone_egl_qt.cpp b/src/core/ozone/gl_ozone_egl_qt.cpp index 2fa86d79b..c692920cf 100644 --- a/src/core/ozone/gl_ozone_egl_qt.cpp +++ b/src/core/ozone/gl_ozone_egl_qt.cpp @@ -55,9 +55,9 @@ #include <EGL/egl.h> #include <dlfcn.h> -#include <QtGui/qtgui-config.h> // for QT_NO_OPENGL +#include <QtGui/qtgui-config.h> -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) #include <QOpenGLContext> QT_BEGIN_NAMESPACE Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); @@ -88,7 +88,7 @@ bool GLOzoneEGLQt::LoadGLES2Bindings(gl::GLImplementation /*implementation*/) reinterpret_cast<gl::GLGetProcAddressProc>( base::GetFunctionPointerFromNativeLibrary(eglgles2Library, "eglGetProcAddress")); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (!get_proc_address) { // QTBUG-63341 most likely libgles2 not linked with libegl -> fallback to qpa if (QOpenGLContext *context = qt_gl_global_share_context()) { |