diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-07-01 18:38:32 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-04 11:00:09 +0200 |
commit | 219c2eb4e28dd1c806cbc2115ff40454d6d3f9c5 (patch) | |
tree | c9aa6a79cf4a4da956ed3e87d002d7613c86f959 | |
parent | 83080e8a7cb7aaa794a9659eeaf34690afe71ddb (diff) |
Rename globalShareContext to qt_gl_global_share_context
This makes it easier to forward-declare the exported symbol from
other Qt modules without having to include the private headers.
This keeps the old API until dependent submodules are updated.
Change-Id: I08310a684b79f2f612f2ce897a601ff74178bee6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 34 | ||||
-rw-r--r-- | src/gui/kernel/qopenglcontext_p.h | 3 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 2 |
3 files changed, 27 insertions, 12 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index c7f4e6455c..8e848f90ae 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -243,6 +243,27 @@ QMutex QOpenGLContextPrivate::makeCurrentTrackerMutex; #endif /*! + \internal + + This function is used by the Qt WebEngine to set up context sharing + across multiple windows. Do not use it for any other purpose. + + Please maintain the binary compatibility of these functions. +*/ +void qt_gl_set_global_share_context(QOpenGLContext *context) +{ + global_share_context = context; +} + +/*! + \internal +*/ +QOpenGLContext *qt_gl_global_share_context() +{ + return global_share_context; +} + +/*! \class QOpenGLContext \inmodule QtGui \since 5.0 @@ -336,23 +357,14 @@ QOpenGLContext *QOpenGLContextPrivate::setCurrentContext(QOpenGLContext *context return previous; } -/*! - \internal - - This function is used by the Qt WebEngine to set up context sharing - across multiple windows. Do not use it for any other purpose. -*/ void QOpenGLContextPrivate::setGlobalShareContext(QOpenGLContext *context) { - global_share_context = context; + qt_gl_set_global_share_context(context); } -/*! - \internal -*/ QOpenGLContext *QOpenGLContextPrivate::globalShareContext() { - return global_share_context; + return qt_gl_global_share_context(); } int QOpenGLContextPrivate::maxTextureSize() diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index 77e3605a4b..4447df5294 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -275,6 +275,9 @@ public: #endif }; +Q_GUI_EXPORT void qt_gl_set_global_share_context(QOpenGLContext *context); +Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); + QT_END_NAMESPACE #endif // QT_NO_OPENGL diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 43ce9a82f7..05e638574d 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -11986,7 +11986,7 @@ QOpenGLContext *QWidgetPrivate::shareContext() const QWidgetPrivate *that = const_cast<QWidgetPrivate *>(this); if (!extra->topextra->shareContext) { QOpenGLContext *ctx = new QOpenGLContext; - ctx->setShareContext(QOpenGLContextPrivate::globalShareContext()); + ctx->setShareContext(qt_gl_global_share_context()); ctx->setFormat(extra->topextra->window->format()); ctx->create(); that->extra->topextra->shareContext = ctx; |