summaryrefslogtreecommitdiff
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@nokia.com>2011-06-22 14:38:32 +0300
committerJani Hautakangas <jani.hautakangas@nokia.com>2011-06-22 14:38:32 +0300
commit14f10211e72f2d04fa7f4e0faa430eb94c1f8f83 (patch)
tree1e8d1e2f758c1090a15123cbcb8f615d867caa47 /src/opengl/qgl_p.h
parente4cce8849bf45be9a111072e3fca7bdf67364e8a (diff)
parent5e80b137d195625c0d57c1c27e5e8464d1ccfa33 (diff)
downloadqt4-tools-14f10211e72f2d04fa7f4e0faa430eb94c1f8f83.tar.gz
Merge remote branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts: src/opengl/qgl.cpp src/opengl/qpixmapdata_symbiangl.cpp src/opengl/qwindowsurface_gl.cpp
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 4748521b16..de349a759d 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -64,6 +64,12 @@
#include "qcache.h"
#include "qglpaintdevice_p.h"
+#ifdef Q_OS_SYMBIAN
+#include "qgltexturepool_p.h"
+
+class QGLPixmapData;
+#endif
+
#ifndef QT_NO_EGL
#include <QtGui/private/qegl_p.h>
#endif
@@ -562,10 +568,21 @@ public:
options(opt)
#if defined(Q_WS_X11)
, boundPixmap(0)
+#elif defined(Q_OS_SYMBIAN)
+ , boundPixmap(0)
+ , boundKey(0)
+ , nextLRU(0)
+ , prevLRU(0)
+ , inLRU(false)
+ , failedToAlloc(false)
+ , inTexturePool(false)
#endif
{}
~QGLTexture() {
+#ifdef Q_OS_SYMBIAN
+ freeTexture();
+#else
if (options & QGLContext::MemoryManagedBindOption) {
Q_ASSERT(context);
#if !defined(Q_WS_X11)
@@ -573,7 +590,8 @@ public:
#endif
context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id);
}
- }
+#endif
+ }
QGLContext *context;
GLuint id;
@@ -593,6 +611,19 @@ public:
(const char *buf, int len, const char *format = 0);
QSize bindCompressedTextureDDS(const char *buf, int len);
QSize bindCompressedTexturePVR(const char *buf, int len);
+
+#ifdef Q_OS_SYMBIAN
+ void freeTexture();
+
+ QGLPixmapData* boundPixmap;
+ qint64 boundKey;
+
+ QGLTexture *nextLRU;
+ QGLTexture *prevLRU;
+ mutable bool inLRU;
+ mutable bool failedToAlloc;
+ mutable bool inTexturePool;
+#endif
};
struct QGLTextureCacheKey {