diff options
Diffstat (limited to 'src/opengl/qpixmapdata_gl.cpp')
-rw-r--r-- | src/opengl/qpixmapdata_gl.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index c193f12..e18f98b 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -132,43 +132,6 @@ void QGLFramebufferObjectPool::release(QGLFramebufferObject *fbo) m_fbos << fbo; } -class QGLShareContextScope -{ -public: - QGLShareContextScope(const QGLContext *ctx) - : m_oldContext(0) - { - QGLContext *currentContext = const_cast<QGLContext *>(QGLContext::currentContext()); - if (currentContext != ctx && !qgl_share_reg()->checkSharing(ctx, currentContext)) { - m_oldContext = currentContext; - m_ctx = const_cast<QGLContext *>(ctx); - m_ctx->makeCurrent(); - } else { - m_ctx = currentContext; - } - } - - operator QGLContext *() - { - return m_ctx; - } - - QGLContext *operator->() - { - return m_ctx; - } - - ~QGLShareContextScope() - { - if (m_oldContext) - m_oldContext->makeCurrent(); - } - -private: - QGLContext *m_oldContext; - QGLContext *m_ctx; -}; - static int qt_gl_pixmap_serial = 0; QGLPixmapData::QGLPixmapData(PixelType type) |