diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-11-16 14:57:44 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-11-16 14:57:44 +0100 |
commit | ef177a48f2c6c41549ef9d11a985ab2661942638 (patch) | |
tree | d6bc5aa8cbde95d9e9857ead4b509e8b04b524b9 /src/core/ozone | |
parent | 396ca081d7b0d9dab7de14ebaec7943c3f857a24 (diff) | |
parent | e5bc5a6dbdd915e0b19cfc43e7af17e43c1a7878 (diff) |
Merge branch '5.12' into dev
Conflicts:
src/core/compositor/compositor.cpp
src/core/compositor/compositor.h
Change-Id: I8a4d73d728d93d95e499849f8778cc88dda2105e
Diffstat (limited to 'src/core/ozone')
-rw-r--r-- | src/core/ozone/gl_ozone_glx_qt.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/core/ozone/gl_ozone_glx_qt.cpp b/src/core/ozone/gl_ozone_glx_qt.cpp index 2e7a28a0e..e3a4f4708 100644 --- a/src/core/ozone/gl_ozone_glx_qt.cpp +++ b/src/core/ozone/gl_ozone_glx_qt.cpp @@ -44,18 +44,12 @@ #include <QGuiApplication> #include "gl_ozone_glx_qt.h" #include "gl_surface_glx_qt.h" +#include "gl_context_qt.h" #include "ui/gl/gl_context_glx.h" #include "ui/gl/gl_gl_api_implementation.h" #include "ui/gl/gl_glx_api_implementation.h" #include <dlfcn.h> -#ifndef QT_NO_OPENGL -#include <QOpenGLContext> -QT_BEGIN_NAMESPACE -Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); -QT_END_NAMESPACE -#endif - namespace ui { bool GLOzoneGLXQt::InitializeGLOneOffPlatform() { @@ -79,16 +73,12 @@ bool GLOzoneGLXQt::InitializeStaticGLBindings( reinterpret_cast<gl::GLGetProcAddressProc>( base::GetFunctionPointerFromNativeLibrary(library, "glXGetProcAddress")); - -#ifndef QT_NO_OPENGL if (!get_proc_address) { // glx handle not loaded, fallback to qpa - if (QOpenGLContext *context = qt_gl_global_share_context()) { - get_proc_address = reinterpret_cast<gl::GLGetProcAddressProc>( - context->getProcAddress("glXGetProcAddress")); - } + QFunctionPointer address = GLContextHelper::getGlXGetProcAddress(); + get_proc_address = reinterpret_cast<gl::GLGetProcAddressProc>(address); } -#endif + if (!get_proc_address) { LOG(ERROR) << "glxGetProcAddress not found."; base::UnloadNativeLibrary(library); |