diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-11-29 11:41:19 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-12-06 09:17:33 +0000 |
commit | 5ca837bf42fd3bdb0cdf74bd10b6d1f63efa50a9 (patch) | |
tree | 9de59509abb1b1efa5f8f512d21451dea2e23d07 | |
parent | 09d75c6d8e83b3d0682e296357577988abae1b3f (diff) | |
download | qtwayland-5ca837bf42fd3bdb0cdf74bd10b6d1f63efa50a9.tar.gz |
Unify getProcAddress behavior in the brcm backend
Task-number: QTBUG-57326
Change-Id: Ie3df866507e591b47e0e65a1867313b0ab388635
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
3 files changed, 10 insertions, 3 deletions
diff --git a/src/hardwareintegration/client/brcm-egl/brcm-egl.pri b/src/hardwareintegration/client/brcm-egl/brcm-egl.pri index 64cb4467..3961f4f1 100644 --- a/src/hardwareintegration/client/brcm-egl/brcm-egl.pri +++ b/src/hardwareintegration/client/brcm-egl/brcm-egl.pri @@ -3,6 +3,8 @@ INCLUDEPATH += $$PWD QMAKE_USE += egl wayland-client QT += egl_support-private +LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD + SOURCES += $$PWD/qwaylandbrcmeglintegration.cpp \ $$PWD/qwaylandbrcmglcontext.cpp \ $$PWD/qwaylandbrcmeglwindow.cpp diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp index f5480b0e..5c585746 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp @@ -48,6 +48,8 @@ #include <qpa/qplatformopenglcontext.h> #include <QtGui/QSurfaceFormat> +#include <dlfcn.h> + QT_BEGIN_NAMESPACE namespace QtWaylandClient { @@ -92,9 +94,12 @@ void QWaylandBrcmGLContext::swapBuffers(QPlatformSurface *surface) static_cast<QWaylandBrcmEglWindow *>(surface)->swapBuffers(); } -void (*QWaylandBrcmGLContext::getProcAddress(const char *procName)) () +QFunctionPointer QWaylandBrcmGLContext::getProcAddress(const char *procName) { - return eglGetProcAddress(procName); + QFunctionPointer proc = (QFunctionPointer) eglGetProcAddress(procName); + if (!proc) + proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName); + return proc; } EGLConfig QWaylandBrcmGLContext::eglConfig() const diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h index a79cfcc6..7a1475e7 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h @@ -63,7 +63,7 @@ public: bool makeCurrent(QPlatformSurface *surface) Q_DECL_OVERRIDE; void doneCurrent() Q_DECL_OVERRIDE; - void (*getProcAddress(const char *procName)) () Q_DECL_OVERRIDE; + QFunctionPointer getProcAddress(const char *procName) Q_DECL_OVERRIDE; QSurfaceFormat format() const Q_DECL_OVERRIDE { return m_format; } |