From 0056c0a654a930fe082787ec7e8579a6e74d9ad5 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Mon, 29 Mar 2010 08:35:39 +0200 Subject: Change ORs to ANDs when checking EGLImage extension defines We should only define the EGLImage functions if both EGL_KHR_image _and_ EGL_KHR_image_base are undefined. Reviewed-By: TrustMe --- src/gui/egl/qegl.cpp | 2 +- src/gui/egl/qegl_p.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 3417781..9a552cf 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -528,7 +528,7 @@ QEglProperties QEglContext::configProperties() const return QEglProperties(config()); } -#if !defined(EGL_KHR_image) || !defined(EGL_KHR_image_base) +#if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_base) _eglCreateImageKHR eglCreateImageKHR = 0; _eglDestroyImageKHR eglDestroyImageKHR = 0; #endif diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index b570329..c659796 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -110,7 +110,7 @@ QT_BEGIN_NAMESPACE #define EGLAPIENTRY #endif -#if !defined(EGL_KHR_image) || !defined(EGL_KHR_image_base) +#if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_base) typedef void *EGLImageKHR; #define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) @@ -123,9 +123,9 @@ typedef EGLBoolean (EGLAPIENTRY *_eglDestroyImageKHR)(EGLDisplay, EGLImageKHR); extern Q_GUI_EXPORT _eglCreateImageKHR eglCreateImageKHR; extern Q_GUI_EXPORT _eglDestroyImageKHR eglDestroyImageKHR; -#endif // !defined(EGL_KHR_image) || !defined(EGL_KHR_image_base) +#endif // !defined(EGL_KHR_image) && !defined(EGL_KHR_image_base) -#if !defined(EGL_KHR_image) || !defined(EGL_KHR_image_pixmap) +#if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_pixmap) #define EGL_NATIVE_PIXMAP_KHR 0x30B0 #endif -- cgit v0.12