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>
This commit is contained in:
parent
83080e8a7c
commit
219c2eb4e2
@ -242,6 +242,27 @@ QHash<QOpenGLContext *, bool> QOpenGLContextPrivate::makeCurrentTracker;
|
|||||||
QMutex QOpenGLContextPrivate::makeCurrentTrackerMutex;
|
QMutex QOpenGLContextPrivate::makeCurrentTrackerMutex;
|
||||||
#endif
|
#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
|
\class QOpenGLContext
|
||||||
\inmodule QtGui
|
\inmodule QtGui
|
||||||
@ -336,23 +357,14 @@ QOpenGLContext *QOpenGLContextPrivate::setCurrentContext(QOpenGLContext *context
|
|||||||
return previous;
|
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)
|
void QOpenGLContextPrivate::setGlobalShareContext(QOpenGLContext *context)
|
||||||
{
|
{
|
||||||
global_share_context = context;
|
qt_gl_set_global_share_context(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
\internal
|
|
||||||
*/
|
|
||||||
QOpenGLContext *QOpenGLContextPrivate::globalShareContext()
|
QOpenGLContext *QOpenGLContextPrivate::globalShareContext()
|
||||||
{
|
{
|
||||||
return global_share_context;
|
return qt_gl_global_share_context();
|
||||||
}
|
}
|
||||||
|
|
||||||
int QOpenGLContextPrivate::maxTextureSize()
|
int QOpenGLContextPrivate::maxTextureSize()
|
||||||
|
@ -275,6 +275,9 @@ public:
|
|||||||
#endif
|
#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
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL
|
#endif // QT_NO_OPENGL
|
||||||
|
@ -11986,7 +11986,7 @@ QOpenGLContext *QWidgetPrivate::shareContext() const
|
|||||||
QWidgetPrivate *that = const_cast<QWidgetPrivate *>(this);
|
QWidgetPrivate *that = const_cast<QWidgetPrivate *>(this);
|
||||||
if (!extra->topextra->shareContext) {
|
if (!extra->topextra->shareContext) {
|
||||||
QOpenGLContext *ctx = new QOpenGLContext;
|
QOpenGLContext *ctx = new QOpenGLContext;
|
||||||
ctx->setShareContext(QOpenGLContextPrivate::globalShareContext());
|
ctx->setShareContext(qt_gl_global_share_context());
|
||||||
ctx->setFormat(extra->topextra->window->format());
|
ctx->setFormat(extra->topextra->window->format());
|
||||||
ctx->create();
|
ctx->create();
|
||||||
that->extra->topextra->shareContext = ctx;
|
that->extra->topextra->shareContext = ctx;
|
||||||
|
Loading…
Reference in New Issue
Block a user