diff -r dee5afe5301f -r 3f74d0d4af4c src/opengl/qgl_p.h --- a/src/opengl/qgl_p.h Mon Mar 15 12:43:09 2010 +0200 +++ b/src/opengl/qgl_p.h Thu Apr 08 14:19:33 2010 +0300 @@ -80,13 +80,19 @@ #define q_vertexTypeEnum GL_FIXED #endif //QT_OPENGL_ES_1_CL -#ifdef QT_OPENGL_ES +#if defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2) QT_BEGIN_INCLUDE_NAMESPACE + #if defined(QT_OPENGL_ES_2) -#include +# include +#endif + +#if defined(QT_GLES_EGL) +# include #else -#include +# include #endif + QT_END_INCLUDE_NAMESPACE #endif @@ -179,7 +185,9 @@ #if defined(Q_WS_X11) && defined(QT_OPENGL_ES) , eglSurfaceWindowId(0) #endif - {} + { + isGLWidget = 1; + } ~QGLWidgetPrivate() {} @@ -522,7 +530,7 @@ QSize bindCompressedTexturePVR(const char *buf, int len); }; -class QGLTextureCache { +class Q_AUTOTEST_EXPORT QGLTextureCache { public: QGLTextureCache(); ~QGLTextureCache(); @@ -538,12 +546,9 @@ static QGLTextureCache *instance(); static void deleteIfEmpty(); - static void imageCleanupHook(qint64 cacheKey); - static void cleanupTextures(QPixmap* pixmap); -#ifdef Q_WS_X11 - // X11 needs to catch pixmap data destruction to delete EGL/GLX pixmap surfaces - static void cleanupPixmapSurfaces(QPixmap* pixmap); -#endif + static void cleanupTexturesForCacheKey(qint64 cacheKey); + static void cleanupTexturesForPixampData(QPixmapData* pixmap); + static void cleanupBeforePixmapDestruction(QPixmapData* pixmap); private: QCache m_cache; @@ -573,7 +578,7 @@ } // One resource per group of shared contexts. -class Q_AUTOTEST_EXPORT QGLContextResource +class Q_OPENGL_EXPORT QGLContextResource { public: typedef void (*FreeFunc)(void *);