summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_egl.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-05 18:04:19 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-05 18:04:19 (GMT)
commitb20ef0ade0aec89b969bd0ae7f754c680e390c67 (patch)
tree9a91ea4dd498684fb5236512f427d2dc2ea03b47 /src/opengl/qgl_egl.cpp
parentc6ac9fe2e8d219bb9694efaf5b25ec5108fb8fa6 (diff)
parent7d587efef35b3adbb3433a4baec1c5ee7105cf0b (diff)
downloadQt-b20ef0ade0aec89b969bd0ae7f754c680e390c67.zip
Qt-b20ef0ade0aec89b969bd0ae7f754c680e390c67.tar.gz
Qt-b20ef0ade0aec89b969bd0ae7f754c680e390c67.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Port QX11GLPixmapData & QX11GLWindowSurface to new QEgl API Make QEgl::createSurface store the surface in the pixmapdata too Make QEgl::ConfigOptions use QFlags
Diffstat (limited to 'src/opengl/qgl_egl.cpp')
-rw-r--r--src/opengl/qgl_egl.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 7bfcf27..91b271b 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -210,23 +210,26 @@ void QGLContextPrivate::destroyEglSurfaceForDevice()
EGLSurface QGLContextPrivate::eglSurfaceForDevice() const
{
- if (paintDevice->devType() == QInternal::Widget)
+ // If a QPixmapData had to create the QGLContext, we don't have a paintDevice
+ if (!paintDevice)
return eglSurface;
- if (paintDevice->devType() == QInternal::Pixmap) {
+
#ifdef Q_WS_X11
+ if (paintDevice->devType() == QInternal::Pixmap) {
QPixmapData *pmd = static_cast<QPixmap*>(paintDevice)->data_ptr().data();
if (pmd->classId() == QPixmapData::X11Class) {
QX11PixmapData* x11PixmapData = static_cast<QX11PixmapData*>(pmd);
return (EGLSurface)x11PixmapData->gl_surface;
- } else
-#endif
- return eglSurface;
+ }
}
+#endif
+
if (paintDevice->devType() == QInternal::Pbuffer) {
QGLPixelBuffer* pbuf = static_cast<QGLPixelBuffer*>(paintDevice);
return pbuf->d_func()->pbuf;
}
- return EGL_NO_SURFACE;
+
+ return eglSurface;
}
void QGLWidget::setMouseTracking(bool enable)