summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_x11egl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl_x11egl.cpp')
-rw-r--r--src/opengl/qgl_x11egl.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 18a2ee5..bcde8c4 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -508,8 +508,13 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons
}
if (pixmapData->gl_surface == 0) {
- bool success = qt_createEGLSurfaceForPixmap(pixmapData, true);
- if (!success) {
+ EGLConfig config = QEgl::defaultConfig(QInternal::Pixmap,
+ QEgl::OpenGL,
+ hasAlpha ? QEgl::Translucent : QEgl::NoOptions);
+
+ QPixmap tmpPixmap(pixmapData); //###
+ pixmapData->gl_surface = (Qt::HANDLE)QEgl::createSurface(&tmpPixmap, config);
+ if (pixmapData->gl_surface == (Qt::HANDLE)EGL_NO_SURFACE) {
haveTFP = false;
return 0;
}