summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_x11egl.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-03-01 15:53:17 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-03-02 08:24:26 (GMT)
commit9c1ff07b427765beb71755e964b017d8258b834e (patch)
tree6d29345397572b5f72d849d833d9f91e21af92a3 /src/opengl/qgl_x11egl.cpp
parentb2cbb880273ae6516d68be5b5f3f9b614c31ca79 (diff)
downloadQt-9c1ff07b427765beb71755e964b017d8258b834e.zip
Qt-9c1ff07b427765beb71755e964b017d8258b834e.tar.gz
Qt-9c1ff07b427765beb71755e964b017d8258b834e.tar.bz2
Make bindTextureFromNativePixmap use new QEgl APIs
The old qt_chooseEGLConfigForPixmap & qt_createEGLSurfaceForPixmap code will remain until QX11GLPixmapData can be re-written properly. Reviewed-By: TrustMe
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;
}