summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-04-15 10:48:56 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-15 10:58:43 (GMT)
commit794cbd5800a4428babc100528fd4fdba49557b6f (patch)
tree59ea1e2e422325eb20074d56ebf30f82bde26343 /src/opengl
parent4c472f1694aa9f35eda248f04decadbe0ef2dd75 (diff)
downloadQt-794cbd5800a4428babc100528fd4fdba49557b6f.zip
Qt-794cbd5800a4428babc100528fd4fdba49557b6f.tar.gz
Qt-794cbd5800a4428babc100528fd4fdba49557b6f.tar.bz2
Wrap EGL image function pointers and move into QEgl namespace
QtGui exporting a symbol called eglCreateImageKHR seems a pretty silly idea. Much better to have them in the QEgl namespace. Reviewed-By: Iain
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl_x11egl.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index af0100b..6f210ce 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -378,8 +378,6 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
// eglCreateImageKHR & eglDestroyImageKHR without support for pixmaps, so we must
// check we have the EGLImage from pixmap functionality.
if (QEgl::hasExtension("EGL_KHR_image") || QEgl::hasExtension("EGL_KHR_image_pixmap")) {
- Q_ASSERT(eglCreateImageKHR);
- Q_ASSERT(eglDestroyImageKHR);
// Being able to create an EGLImage from a native pixmap is also pretty useless
// without the ability to bind that EGLImage as a texture, which is provided by
@@ -436,15 +434,13 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
// If the pixmap doesn't already have a valid surface, try binding it via EGLImage
// first, as going through EGLImage should be faster and better supported:
if (!textureIsBound && haveEglImageTFP) {
- Q_ASSERT(eglCreateImageKHR);
-
EGLImageKHR eglImage;
EGLint attribs[] = {
EGL_IMAGE_PRESERVED_KHR, EGL_TRUE,
EGL_NONE
};
- eglImage = eglCreateImageKHR(QEgl::display(), EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR,
+ eglImage = QEgl::eglCreateImageKHR(QEgl::display(), EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR,
(EGLClientBuffer)QEgl::nativePixmap(pixmap), attribs);
QGLContext* ctx = q;
@@ -457,7 +453,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
// Once the egl image is bound, the texture becomes a new sibling image and we can safely
// destroy the EGLImage we created for the pixmap:
if (eglImage != EGL_NO_IMAGE_KHR)
- eglDestroyImageKHR(QEgl::display(), eglImage);
+ QEgl::eglDestroyImageKHR(QEgl::display(), eglImage);
}
if (!textureIsBound && haveTFP) {