diff options
Diffstat (limited to 'src/opengl/qgl_egl.cpp')
-rw-r--r-- | src/opengl/qgl_egl.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 4de5122a86..dcf340fb10 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -261,8 +261,7 @@ void QGLContextPrivate::destroyEglSurfaceForDevice() #if defined(Q_WS_X11) || defined(Q_OS_SYMBIAN) // Make sure we don't call eglDestroySurface on a surface which // was created for a different winId. This applies only to QGLWidget - // paint device, so make sure this is the one we're operating on - // (as opposed to a QGLWindowSurface use case). + // paint device, so make sure this is the one we're operating on. if (paintDevice && paintDevice->devType() == QInternal::Widget) { QWidget *w = static_cast<QWidget *>(paintDevice); if (QGLWidget *wgl = qobject_cast<QGLWidget *>(w)) { @@ -281,16 +280,16 @@ void QGLContextPrivate::destroyEglSurfaceForDevice() EGLSurface QGLContextPrivate::eglSurfaceForDevice() const { - // If a QPixmapData had to create the QGLContext, we don't have a paintDevice + // If a QPlatformPixmap had to create the QGLContext, we don't have a paintDevice if (!paintDevice) return eglSurface; #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; + QPlatformPixmap *pmd = static_cast<QPixmap*>(paintDevice)->data_ptr().data(); + if (pmd->classId() == QPlatformPixmap::X11Class) { + QX11PlatformPixmap* x11PlatformPixmap = static_cast<QX11PlatformPixmap*>(pmd); + return (EGLSurface)x11PlatformPixmap->gl_surface; } } #endif |