summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-09-06 16:44:59 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-09-07 08:36:21 +0200
commit6119d12d7d7d63b00891e7fa21a5fab6751fb062 (patch)
treecde6a0b93fca880ac27f1e43a177c12ccca4734b /src/plugins
parent3883b4f5b1a55922bdbe4e69109ff1f6b7f8277d (diff)
Fixed tst_QGL::partialGLWidgetUpdates.
Change-Id: Ie37051e28b199b5d159f5be05be41efbd17fdf08 Reviewed-on: http://codereview.qt.nokia.com/4273 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 41650efcdb..3d181dcf0c 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -125,15 +125,43 @@ QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const
class QEGLXcbPlatformContext : public QEGLPlatformContext
{
public:
- QEGLXcbPlatformContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share, EGLDisplay display)
+ QEGLXcbPlatformContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share,
+ EGLDisplay display, QXcbConnection *c)
: QEGLPlatformContext(glFormat, share, display)
+ , m_connection(c)
{
+ Q_XCB_NOOP(m_connection);
+ }
+
+ void swapBuffers(QPlatformSurface *surface)
+ {
+ Q_XCB_NOOP(m_connection);
+ QEGLPlatformContext::swapBuffers(surface);
+ Q_XCB_NOOP(m_connection);
+ }
+
+ bool makeCurrent(QPlatformSurface *surface)
+ {
+ Q_XCB_NOOP(m_connection);
+ bool ret = QEGLPlatformContext::makeCurrent(surface);
+ Q_XCB_NOOP(m_connection);
+ return ret;
+ }
+
+ void doneCurrent()
+ {
+ Q_XCB_NOOP(m_connection);
+ QEGLPlatformContext::doneCurrent();
+ Q_XCB_NOOP(m_connection);
}
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface)
{
return static_cast<QXcbWindow *>(surface)->eglSurface()->surface();
}
+
+private:
+ QXcbConnection *m_connection;
};
#endif
@@ -143,7 +171,8 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
#if defined(XCB_USE_GLX)
return new QGLXContext(screen, context->format(), context->shareHandle());
#elif defined(XCB_USE_EGL)
- return new QEGLXcbPlatformContext(context->format(), context->shareHandle(), screen->connection()->egl_display());
+ return new QEGLXcbPlatformContext(context->format(), context->shareHandle(),
+ screen->connection()->egl_display(), screen->connection());
#elif defined(XCB_USE_DRI2)
return new QDri2Context(context->format(), context->shareHandle());
#endif