diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-07-01 18:39:14 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-06 19:07:51 +0200 |
commit | 3b1caeb21a66ca939854b897824e9e853ba60b67 (patch) | |
tree | 8ca7dd7077608e5f083b8c7858b6e5fc5f652ebb /src | |
parent | fffb6233a366a92336aeed690cae0b704358511d (diff) |
Get rid of QOpenGLContextPrivate::setGlobalShareContex
Manually import qt_(set_)gl_global_share_context from QtGui
instead.
The binary compatibility of those symbols should be maintained
in QtGui, allowing us to avoid depending on private API.
Change-Id: I1f954ec10a793c3195d3aec01409dde1bc767d64
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/content_browser_client_qt.cpp | 8 | ||||
-rw-r--r-- | src/webengine/api/qtwebengineglobal.cpp | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 259392ca8..e8fc3adda 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -62,9 +62,13 @@ #include "web_contents_view_qt.h" #include <QGuiApplication> -#include <QtGui/private/qopenglcontext_p.h> +#include <QOpenGLContext> #include <qpa/qplatformnativeinterface.h> +QT_BEGIN_NAMESPACE +Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); +QT_END_NAMESPACE + namespace { ContentBrowserClientQt* gBrowserClient = 0; // Owned by ContentMainDelegateQt. @@ -261,7 +265,7 @@ private: void ShareGroupQtQuick::AboutToAddFirstContext() { // This currently has to be setup by ::main in all applications using QQuickWebEngineView with delegated rendering. - QOpenGLContext *shareContext = QOpenGLContextPrivate::globalShareContext(); + 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."); } diff --git a/src/webengine/api/qtwebengineglobal.cpp b/src/webengine/api/qtwebengineglobal.cpp index baa335740..f45f7663f 100644 --- a/src/webengine/api/qtwebengineglobal.cpp +++ b/src/webengine/api/qtwebengineglobal.cpp @@ -42,11 +42,13 @@ #include "qtwebengineglobal.h" #include <QGuiApplication> +#include <QOpenGLContext> #include <QThread> -#include <private/qopenglcontext_p.h> QT_BEGIN_NAMESPACE +Q_GUI_EXPORT void qt_gl_set_global_share_context(QOpenGLContext *context); + namespace QtWebEngine { static QOpenGLContext *shareContext; @@ -75,7 +77,7 @@ void initialize() shareContext = new QOpenGLContext; shareContext->create(); qAddPostRoutine(deleteShareContext); - QOpenGLContextPrivate::setGlobalShareContext(shareContext); + qt_gl_set_global_share_context(shareContext); } } // namespace QtWebEngine |