diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-09 18:28:11 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-09 18:28:11 (GMT) |
commit | 796010e822884a895eaf1597f4ae20eb2c0ac926 (patch) | |
tree | 4f4474001bc49c85701d52e226653354ab3d673c | |
parent | b7a511d043e4ffd38f145f9a339a1750d941d2a4 (diff) | |
parent | 06588b7704a4bd41b558a0abe611f3490b6f17e6 (diff) | |
download | Qt-796010e822884a895eaf1597f4ae20eb2c0ac926.zip Qt-796010e822884a895eaf1597f4ae20eb2c0ac926.tar.gz Qt-796010e822884a895eaf1597f4ae20eb2c0ac926.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Add missing freeTexture() from fix for QTBUG-19180
-rw-r--r-- | src/opengl/qgl.cpp | 22 | ||||
-rw-r--r-- | src/opengl/qgl_p.h | 6 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 6248cfe..4fee886 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -5902,4 +5902,26 @@ QSize QGLTexture::bindCompressedTexturePVR(const char *buf, int len) #undef ctx +#ifdef Q_OS_SYMBIAN +void QGLTexture::freeTexture() +{ + if (!id) + return; + + if (inTexturePool) + QGLTexturePool::instance()->detachTexture(this); + + if (boundPixmap) + boundPixmap->releaseNativeImageHandle(); + + if (options & QGLContext::MemoryManagedBindOption) { + Q_ASSERT(context); + context->d_ptr->texture_destroyer->emitFreeTexture(context, 0, id); + } + + id = 0; + boundKey = 0; +} +#endif + QT_END_NAMESPACE diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 2fb7e58..2ca8dc9 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -558,6 +558,9 @@ public: {} ~QGLTexture() { +#ifdef Q_OS_SYMBIAN + freeTexture(); +#else if (options & QGLContext::MemoryManagedBindOption) { Q_ASSERT(context); #if !defined(Q_WS_X11) @@ -565,6 +568,7 @@ public: #endif context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id); } +#endif } QGLContext *context; @@ -587,6 +591,8 @@ public: QSize bindCompressedTexturePVR(const char *buf, int len); #ifdef Q_OS_SYMBIAN + void freeTexture(); + QGLPixmapData* boundPixmap; qint64 boundKey; |