summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpixmapdata_x11gl_p.h
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-04-21 15:40:04 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-22 14:38:00 (GMT)
commit1a00c7dec743c05b0f64bcacc03b3d2c90ac881d (patch)
treed5978862d076dbd43c0c03f8ecc0bbc8e35e1544 /src/opengl/qpixmapdata_x11gl_p.h
parent71d6e5a73b6e4434c47194d938a8b74c92170644 (diff)
downloadQt-1a00c7dec743c05b0f64bcacc03b3d2c90ac881d.zip
Qt-1a00c7dec743c05b0f64bcacc03b3d2c90ac881d.tar.gz
Qt-1a00c7dec743c05b0f64bcacc03b3d2c90ac881d.tar.bz2
QX11GL: Move the shared context ownership into a seperate class
This patch moves initialisation into a new QX11GLSharedContexts class which is created as a Q_GLOBAL_STATIC. This class owns both the RGB/ARGB EGL contexts and the QGLContext used for sharing. Finally, the shared QGLContext is make a valid context wrapping the RGB EGL context and a small pixmap surface. This makes the shared QGLContext the QGLContextGroup master, so when it is deleted, it can be made current to delete the GL resources. Among other benefits, this patch stops apps seg-faulting when they gracefully quit. Reviewed-By: TrustMe
Diffstat (limited to 'src/opengl/qpixmapdata_x11gl_p.h')
-rw-r--r--src/opengl/qpixmapdata_x11gl_p.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/opengl/qpixmapdata_x11gl_p.h b/src/opengl/qpixmapdata_x11gl_p.h
index b613eba..2d1336b 100644
--- a/src/opengl/qpixmapdata_x11gl_p.h
+++ b/src/opengl/qpixmapdata_x11gl_p.h
@@ -65,6 +65,8 @@
QT_BEGIN_NAMESPACE
+class QX11GLSharedContexts;
+
class QX11GLPixmapData : public QX11PixmapData, public QGLPaintDevice
{
public:
@@ -84,11 +86,8 @@ public:
static bool hasX11GLPixmaps();
static QGLFormat glFormat();
+ static QX11GLSharedContexts* sharedContexts();
-#ifndef QT_NO_EGL
- static QEglContext* rgbContext;
- static QEglContext* argbContext;
-#endif
private:
mutable QGLContext* ctx;
};