From 61615ea7ff51e0d57f5292e7cc0943f1eed351f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 6 Jan 2011 13:02:29 +0100 Subject: [PATCH] Need to copy QPixmap to QImage in GLES. The Image extension seems to need the pixmap around and that's something we cannot guarantee in the generic case. --- lib/kwinglutils.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index 9579c7cc7f..53e1f6bd34 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -530,25 +530,7 @@ bool GLTexture::load( const QPixmap& pixmap, GLenum target ) { if( pixmap.isNull()) return false; -#ifdef KWIN_HAVE_OPENGLES - if( isNull() ) - glGenTextures( 1, &mTexture ); - mTarget = target; - bind(); - const EGLint attribs[] = { - EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, - EGL_NONE - }; - EGLDisplay dpy = eglGetCurrentDisplay(); - EGLImageKHR image = eglCreateImageKHR(dpy, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, - (EGLClientBuffer)pixmap.handle(), attribs); - glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)image); - eglDestroyImageKHR(dpy, image); - unbind(); - return true; -#else return load( pixmap.toImage(), target ); -#endif } bool GLTexture::load( const QString& fileName )