diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-04-13 06:49:52 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-04-13 07:45:00 (GMT) |
commit | 3ba6c3b7a4261147addc1d7fb06060dae7522691 (patch) | |
tree | cded7ec5f02e5f6ea082110185c6da2e03d514e9 /src/opengl/qwindowsurface_gl.cpp | |
parent | 0108e888480e47e65d82d94e10a7c7c910e42d79 (diff) | |
download | Qt-3ba6c3b7a4261147addc1d7fb06060dae7522691.zip Qt-3ba6c3b7a4261147addc1d7fb06060dae7522691.tar.gz Qt-3ba6c3b7a4261147addc1d7fb06060dae7522691.tar.bz2 |
Remove DefaultSharedContext from Lighthouse API.
QPlatformWindowFormat::setUseDefaultSharedContext was meant as a
convenience, but it adds complexity in the platform plugin
implementation, and can be implemented by the above layers using
QPlatformWindowFormat::setSharedContext.
Reviewed-by: Jørgen Lind
Diffstat (limited to 'src/opengl/qwindowsurface_gl.cpp')
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 681ab69..a6489a6 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -181,7 +181,6 @@ QGLGraphicsSystem::QGLGraphicsSystem(bool useX11GL) // // QGLWindowSurface // -#ifndef Q_WS_QPA class QGLGlobalShareWidget { public: @@ -257,22 +256,13 @@ void qt_destroy_gl_share_widget() { _qt_gl_share_widget()->destroy(); } -#endif//Q_WS_QPA const QGLContext *qt_gl_share_context() { -#ifdef Q_WS_QPA - //make it possible to have an assesor to defaultSharedGLContext. - const QPlatformGLContext *platformContext = QPlatformGLContext::defaultSharedContext(); - if (!platformContext) - qDebug() << "Please implement a defaultSharedContext for your platformplugin"; - return QGLContext::fromPlatformGLContext(const_cast<QPlatformGLContext *>(platformContext)); -#else QGLWidget *widget = qt_gl_share_widget(); if (widget) return widget->context(); return 0; -#endif } #ifdef QGL_USE_TEXTURE_POOL @@ -405,7 +395,6 @@ QGLWindowSurface::~QGLWindowSurface() delete d_ptr->fbo; delete d_ptr; -#ifndef Q_WS_QPA if (QGLGlobalShareWidget::cleanedUp) return; @@ -426,7 +415,6 @@ QGLWindowSurface::~QGLWindowSurface() qt_destroy_gl_share_widget(); } #endif // QGL_USE_TEXTURE_POOL -#endif // Q_WS_QPA } void QGLWindowSurface::deleted(QObject *object) @@ -476,10 +464,8 @@ void QGLWindowSurface::hijackWindow(QWidget *widget) ctx->create(qt_gl_share_context()); -#ifndef Q_WS_QPA if (widget != qt_gl_share_widget()) ++(_qt_gl_share_widget()->widgetRefCount); -#endif #ifndef QT_NO_EGL static bool checkedForNOKSwapRegion = false; |